{"id":19281,"library":"babel-preset-es2015-native-modules","title":"babel-preset-es2015-native-modules","description":"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.","status":"deprecated","version":"6.9.4","language":"javascript","source_language":"en","source_url":"https://github.com/araphel/babel-preset-es2015-native-modules","tags":["javascript","babel","preset","es2015","es2015-native-modules","plugins","native-modules","no-commonjs","webpack"],"install":[{"cmd":"npm install babel-preset-es2015-native-modules","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-es2015-native-modules","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-es2015-native-modules","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"runtime dependency for Babel transpilation","package":"babel-core","optional":false}],"imports":[{"note":"This package provides a preset, not a JS export. Use in .babelrc or Babel config.","wrong":"import babelPresetES2015NativeModules from 'babel-preset-es2015-native-modules'","symbol":"default","correct":"module.exports = { presets: ['es2015-native-modules'] }"}],"quickstart":{"code":"// Install\nnpm install --save-dev babel-preset-es2015-native-modules\n\n// .babelrc\n{\n  \"presets\": [\"es2015-native-modules\"]\n}\n\n// Modern equivalent (Babel >=6):\n// Use { \"modules\": false } or preset-env with modules: false","lang":"json","description":"Shows installation and usage in .babelrc, plus migration hint to modern config."},"warnings":[{"fix":"Replace with `['es2015', { modules: false }]` or better, `['@babel/preset-env', { modules: false }]`","message":"This preset is deprecated and no longer necessary. Use `es2015` or `@babel/preset-env` with `modules: false` instead.","severity":"deprecated","affected_versions":">=6.0"},{"fix":"Upgrade to @babel/preset-env with `modules: false` and webpack 4+.","message":"This preset only works with Babel 6 and webpack 2 for tree-shaking. Not compatible with Babel 7 or newer webpack versions.","severity":"gotcha","affected_versions":">=6.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev babel-preset-es2015-native-modules`","cause":"Package not installed or not in node_modules","error":"Cannot find module 'babel-preset-es2015-native-modules'"},{"fix":"Do not use this preset with Babel 7; use @babel/preset-env instead.","cause":"If using Babel 7 with this Babel 6 preset, incompatible version","error":"Error: Plugin/Preset files are not allowed to export objects, only functions."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}