esbuild plugin for removing assert
, debug
etc.
Works like mini-unassert but for esbuild.
$ npm install --save esbuild-plugin-drop
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))
Apache-2.0 © 2002 Damian Krzeminski
Apache-2.0 © 2018 Renée Kooi