esbuild-plugin-ignore

    1.1.0 • Public • Published

    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.

    Install

    npm i esbuild-plugin-ignore

    DownloadsWeekly Downloads

    218

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    6.81 kB

    Total Files

    12

    Last publish

    Collaborators

    • knowre