Registry / serialization / babel-preset-es2015-script

babel-preset-es2015-script

JSON →
library1.1.0jsnpmunverified

Babel preset for ES2015 targeted at browser scripts, not ES6 modules. Version 1.1.0. It is based on the standard es2015 preset but excludes the transform-es2015-modules-commonjs plugin, making it suitable for use in browser environments where you want to transpile ES2015 to ES5 without transforming modules. This preset is ideal for projects that use native ES modules or a separate module bundler. It has a stable release cadence with no recent updates, largely superseded by @babel/preset-env.

npm install babel-preset-es2015-script
INSTALL
IMPORT
SIG · BABEL-PRESET-ES201
B
babel-preset-es2015-script
serializationjavascriptv1.1.0
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
Use in .babelrc: { "presets": ["es2015-script"] }
Directly requiring the preset module
This is a Babel preset, not a JavaScript module to import. It is used via Babel configuration.

Configure Babel to use the es2015-script preset and transpile ES2015 arrow functions and template literals to ES5.

// .babelrc { "presets": ["es2015-script"] } // Example: ES2015 code (e.g., app.js) const greeting = (name) => `Hello, ${name}!`; console.log(greeting('World')); // Build command // npm install --save-dev babel-cli babel-preset-es2015-script // babel app.js --out-file app.es5.js
Debug
Known issues
deprecatedbabel-preset-es2015-script is deprecated in favor of @babel/preset-env
fix
Use @babel/preset-env with appropriate targets. Example: { "presets": [["@babel/preset-env", { "targets": { "browsers": ["last 2 versions"] } }]] }
affects: >=1.0.0
Errors
Common errors & fixes
ModuleNotFoundError: Module not found: Error: Can't resolve 'babel-preset-es2015-script'
preset not installed or incorrect package name
fix
Run: npm install --save-dev babel-preset-es2015-script
Error: Requires Babel ^6.0.0, but loaded with Babel 7
Preset incompatible with Babel 7
fix
Upgrade to @babel/preset-env for Babel 7 compatibility
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
babel-corerequiredRequires Babel 6 core for preset resolution
babel-preset-es2015requiredBundled as part of the preset, but the preset itself pulls from the standard es2015 preset
Agent activity
15 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
babel-preset-es2015-script — npm install babel-preset-es2015-script · libregistry