esbuild-plugin-drop

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i esbuild-plugin-drop

Weekly Downloads

16

Version

1.1.0

License

Apache-2.0

Unpacked Size

6.01 kB

Total Files

6

Last publish

Collaborators

  • pirxpilot