Skip to content

Change where a module dependency is resolved/imported from.

License

Notifications You must be signed in to change notification settings

markwylde/esbuild-plugin-resolve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esbuild-plugin-resolve

Change where a module dependency is resolved/imported from.

Installation

npm i --save-dev esbuild-plugin-resolve

Usage

import esbuild from 'esbuild';
import resolve from 'esbuild-plugin-resolve';

esbuild.build({
  entryPoints: ['./src/index.js'],
  bundle: true,
  outfile: './lib/index.js',
  plugins: [resolve({
    test: 'test-two/lib/example'
  })]
});

// The following will be rewritten
import test from 'test'
import test from 'test-two/lib/example'

About

Change where a module dependency is resolved/imported from.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •