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-scriptVerified import paths — ran on the pinned version, not inferred.
Configure Babel to use the es2015-script preset and transpile ES2015 arrow functions and template literals to ES5.
Use @babel/preset-env with appropriate targets. Example: { "presets": [["@babel/preset-env", { "targets": { "browsers": ["last 2 versions"] } }]] }Run: npm install --save-dev babel-preset-es2015-script
Upgrade to @babel/preset-env for Babel 7 compatibility