esbuild-plugin-resolve
v2.0.0
Published
Change where a module dependency is resolved/imported from.
Downloads
46,181
Maintainers
Readme
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'