Registry / serialization / babel-preset-es2015-loose

babel-preset-es2015-loose

JSON →
library8.0.0jsnpmunverified

Babel preset that enables loose mode for all es2015 plugins. Latest version 8.0.0, deprecated since Babel v6.13+ because the official babel-preset-es2015 now natively supports loose mode via configuration. This preset works by modifying babel-preset-es2015 using modify-babel-preset. It requires installing both babel-preset-es2015-loose and babel-preset-es2015. No longer recommended for Babel v6.13+; directly use ["es2015", {"loose": true}] instead.

npm install babel-preset-es2015-loose
INSTALL
IMPORT
SIG · BABEL-PRESET-ES201
B
babel-preset-es2015-loose
serializationjavascriptv8.0.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
Require via babel preset configuration (".babelrc" or programmatic)
Direct import in code: import preset from 'babel-preset-es2015-loose' is not intended
This is a Babel preset, not a JavaScript module meant for direct import. Use it in Babel configuration under the 'presets' array.

Install, configure in .babelrc, and run a transpilation example using the loose preset. (250+ chars)

// Install both packages npm install --save-dev babel-preset-es2015-loose babel-preset-es2015 // .babelrc { "presets": ["es2015-loose"] } // Example input (test.js) const x = [1, 2, 3]; const y = [...x, 4]; console.log(y); // Transpile with Babel CLI babel test.js --presets es2015-loose // Or programmatically const babel = require('babel-core'); const result = babel.transform('const x = [1, 2, 3]; const y = [...x, 4];', { presets: ['es2015-loose'] }); console.log(result.code);
Debug
Known issues
deprecatedThis preset is deprecated for Babel v6.13+. Use official babel-preset-es2015 with loose option.
fix
Replace 'es2015-loose' with ["es2015", {"loose": true}] in your Babel config and uninstall babel-preset-es2015-loose.
affects: >=7.0.0
breakingBreaking change from v6 to v7: requires explicit installation of babel-preset-es2015 due to modify-babel-preset.
fix
Ensure babel-preset-es2015 is listed as a dependency in package.json and installed.
affects: >=7.0.0
gotchaLoose mode may deviate from spec; cross-browser compatibility may be affected.
fix
Test thoroughly in target environments, or avoid loose mode for spec compliance.
affects: all
gotchaThe preset version is tied to modify-babel-preset, not babel core; updates may lag.
fix
Consider using official babel-preset-es2015 directly with loose option if on Babel v6.13+.
affects: all
Errors
Common errors & fixes
Cannot find module 'babel-preset-es2015'
Missing peer dependency babel-preset-es2015 was not installed.
fix
Run: npm install --save-dev babel-preset-es2015
Unknown preset "es2015-loose" is not a valid preset or plugin
Preset not installed or Babel cannot locate it.
fix
Verify babel-preset-es2015-loose is in node_modules and listed in package.json devDependencies.
Error: Preset es2015-loose requires babel-preset-es2015 (>=6.0.0) to be installed
babel-preset-es2015 version does not satisfy the peer dependency range.
fix
Update babel-preset-es2015 to version 6.0.0 or higher.
Upgrade
Version history
8.0.0latest on npm
Audit
Dependencies
babel-preset-es2015requiredThis preset modifies babel-preset-es2015; it must be installed as a peer dependency.
Agent activity
16 hits · last 30 days
node
12
OpenAI (training)
1
Resources
babel-preset-es2015-loose — npm install babel-preset-es2015-loose · libregistry