esbuild-plugin-drop
esbuild plugin for removing assert
, debug
etc.
Works like mini-unassert but for esbuild.
Install
$ npm install --save esbuild-plugin-drop
Usage
Like any other esbuild plugin.
const dropPlugin = require('esbuild-plugin-drop');
// by default only `assert` is dropped
// you can pass an array of module names though
const drop = dropPlugin({ modules: ['assert', 'debug'] })
require('esbuild')
.build({
entryPoints: ['app.js'],
bundle: true,
outfile: 'out.js',
plugins: [drop],
})
.catch(() => process.exit(1))
License
Apache-2.0 © 2002 Damian Krzeminski
Apache-2.0 © 2018 Renée Kooi