Skip to content

externalize all packages except the ones passed to this plugin

License

Notifications You must be signed in to change notification settings

mayank99/esbuild-plugin-noexternal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esbuild-plugin-noexternal

Will mark all npm packages as "external", except the ones passed to this plugin. Kinda like Vite's noExternal option.

npm i -D esbuild-plugin-noexternal
import esbuild from 'esbuild';
import externalizeAllPackagesExcept from 'esbuild-plugin-noexternal';

esbuild.build({
	// ...
	bundle: true,
	plugins: [externalizeAllPackagesExcept(['nanoid', 'slash' /*...*/])],
});

About

externalize all packages except the ones passed to this plugin

Resources

License

Stars

Watchers

Forks