Babel plugin (v0.4.2) that removes specific named bindings from import declarations and corresponding export references. Useful for stripping development-only or debugging code from production builds. Unlike general dead-code elimination, it targets imports by source and binding name, working at AST level. Maintained by the Glimmer.js team; used within the Glimmer-VM ecosystem. Low release cadence.
npm install babel-plugin-nukable-importVerified import paths — ran on the pinned version, not inferred.
Configures Babel to remove all bindings from '@glimmer/debug' import, stripping debug code.
Use named imports for bindings you wish to remove, or use a different plugin for default imports.
Ensure the import source has no side effects, or use sideEffects: false in package.json.
Use delegate only for removing call expressions or identifier references; for other cases, write a custom plugin.
Avoid duplicate import declarations from the same source in the same file.
Add a guard in your delegate: if (t.isCallExpression(path) || t.isIdentifier(path)) { ... }Use ['nukable-import', options] syntax in your Babel config.
Use import.meta.glob or dynamic import, or configure Babel as CommonJS.
No dependency data recorded yet.