1.1.1 • Published 2 years ago

esbuild-plugin-ignore v1.1.1

Weekly downloads
360
License
MIT
Repository
github
Last release
2 years ago

esbuild-plugin-ignore

Plugin to ignore some certain dependencies from bundling, for esbuild. It's behavior is much same as the IgnorePlugin from webpack(https://webpack.js.org/plugins/ignore-plugin/).

Usage

{
	// Other esbuild options,
	plugins: [
		ignorePlugin([
			{
				resourceRegExp: /pg-native$/,
				contextRegExp: /node_modules\/sequelize|node_modules\/pg/
			},
			{
				resourceRegExp: /tedious|sqlite3|mariadb$/,
				contextRegExp: /node_modules\/sequelize/
			}
		])
	]
}
  • It's the same as the Webpack 5's plugin of the same name.
  • You can refer to example directory for usage.
  • It supports both ESM and CommonJS.