Registry / serialization / babel-preset-es2015-native-modules

babel-preset-es2015-native-modules

JSON →
library6.9.4jsnpmunverified

A Babel preset that includes all ES2015 plugins except babel-plugin-transform-es2015-modules-commonjs, preserving native ES module syntax. Version 6.9.4 is the final release and is deprecated as of Babel 6. It was designed to enable tree-shaking with webpack 2 and Babel 6 by keeping import/export statements intact. The same functionality is now achieved natively via the `modules: false` option in the `es2015` preset. No longer maintained; users should migrate to modern Babel configurations.

npm install babel-preset-es2015-native-modules
INSTALL
IMPORT
SIG · BABEL-PRESET-ES201
B
babel-preset-es2015-native-modules
serializationjavascriptv6.9.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
module.exports = { presets: ['es2015-native-modules'] }
import babelPresetES2015NativeModules from 'babel-preset-es2015-native-modules'
This package provides a preset, not a JS export. Use in .babelrc or Babel config.

Shows installation and usage in .babelrc, plus migration hint to modern config.

// Install npm install --save-dev babel-preset-es2015-native-modules // .babelrc { "presets": ["es2015-native-modules"] } // Modern equivalent (Babel >=6): // Use { "modules": false } or preset-env with modules: false
Debug
Known issues
deprecatedThis preset is deprecated and no longer necessary. Use `es2015` or `@babel/preset-env` with `modules: false` instead.
fix
Replace with `['es2015', { modules: false }]` or better, `['@babel/preset-env', { modules: false }]`
affects: >=6.0
gotchaThis preset only works with Babel 6 and webpack 2 for tree-shaking. Not compatible with Babel 7 or newer webpack versions.
fix
Upgrade to @babel/preset-env with `modules: false` and webpack 4+.
affects: >=6.0
Errors
Common errors & fixes
Cannot find module 'babel-preset-es2015-native-modules'
Package not installed or not in node_modules
fix
Run `npm install --save-dev babel-preset-es2015-native-modules`
Error: Plugin/Preset files are not allowed to export objects, only functions.
If using Babel 7 with this Babel 6 preset, incompatible version
fix
Do not use this preset with Babel 7; use @babel/preset-env instead.
Upgrade
Version history
6.9.4latest on npm
Audit
Dependencies
babel-corerequiredruntime dependency for Babel transpilation
Agent activity
16 hits · last 30 days
node
12
OpenAI (training)
1
Resources
babel-preset-es2015-native-modules — npm install babel-preset-es2015-native-modules · libregistry