Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 481 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 481 Bytes

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' /*...*/])],
});