A Babel plugin that strips ES2015 import/export statements from JavaScript modules. Current version 0.1.3, last released as prerelease-only (no stable release after). This plugin was used by Bootstrap v4.0.0-beta through v4.1.2 to remove module syntax without bundling. It is an alternative to @babel/plugin-transform-modules-commonjs for code that is already concatenated or bundled by other tools. Requires modules: false in @babel/preset-env. Unmaintained since 2018.
npm install babel-plugin-transform-es2015-modules-stripVerified import paths — ran on the pinned version, not inferred.
Shows how to configure Babel with the plugin to strip import/export statements from a module.
Consider using a modern approach: if you need to strip imports, use @babel/plugin-transform-modules-commonjs with modules: false? Actually, modules: false already removes module syntax. This plugin is redundant when modules: false in preset-env. If you need to strip imports for bundling, use a bundler like Rollup or Webpack.
Always set modules: false in @babel/preset-env when using this plugin.
Use 'transform-es2015-modules-strip' as the plugin name.
Ensure that the imported variables are either removed manually or are defined elsewhere (e.g., via a global script or concatenation).
Run 'npm install --save-dev babel-plugin-transform-es2015-modules-strip'.
Ensure plugin is installed and use the correct short name without 'babel-plugin-' prefix.
Add '@babel/preset-env' with modules: false to your Babel config.
No dependency data recorded yet.