esbuild-plugin-drop

Like drop console but for assert/debug


Keywords
esbuild, plugin, unassert, unassertify, undebugify, esbuild-plugin
License
Apache-2.0
Install
npm install esbuild-plugin-drop@1.1.0

Documentation

NPM version Build Status Dependency Status

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