Registry / babel-preset-es2015-loose-rollup

babel-preset-es2015-loose-rollup

JSON →
library7.0.0jsnpmunverified

Babel preset that combines es2015-loose and es2015-rollup presets for tree-shaking with Rollup. Note that version numbering is independent of Babel versions. This package is deprecated in favor of @babel/preset-env. Last release v7.0.0, no active maintenance. Not compatible with Babel 7.x (only Babel 6.x). Do not use for new projects.

npm install babel-preset-es2015-loose-rollup
INSTALL
IMPORT
SIG · BABEL-PRESET-ES201
B
babel-preset-es2015-loose-rollup
javascriptv7.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
// In .babelrc: "presets": ["es2015-loose-rollup"]
// Using require in code: const preset = require('babel-preset-es2015-loose-rollup')
Presets are configured via .babelrc or programmatic API, not directly imported as module.
name
// Correct preset name string: 'es2015-loose-rollup'
// Wrong: 'es2015-loose-rollup' misspelled or using old 'es2015' prefix
Preset name must match exactly. Babel 6 only; for Babel 7 use @babel/preset-env with options.
config
require('babel-core').transform(code, { presets: ['es2015-loose-rollup'] })
// Common mistake: passing object instead of string: require('babel-core').transform(code, { presets: [require('babel-preset-es2015-loose-rollup')] })
Preset names are strings, not required modules, in Babel 6 API.

Shows how to configure the preset in .babelrc for Babel 6 with Rollup.

{ "presets": ["es2015-loose-rollup"] }
Debug
Known issues
deprecatedThis package is deprecated in favor of @babel/preset-env with "modules": false for Rollup tree-shaking.
fix
Replace with @babel/preset-env and set modules to false.
affects: *
breakingVersion 7.0.0 does not correspond to Babel 7; it is still for Babel 6 and will not work with Babel 7.
fix
Use @babel/preset-env for Babel 7 projects.
affects: 7.0.0
gotchaLoose mode may produce code that is not spec-compliant, potentially breaking edge cases.
fix
Avoid loose mode unless you fully understand the implications and test thoroughly.
affects: *
gotchaThe preset is specifically for use with Rollup; using with other bundlers may not yield tree-shaking benefits.
fix
Use @babel/preset-env with appropriate module format for other bundlers.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'babel-preset-es2015-loose-rollup'
Preset name typo or not installed locally or globally.
fix
npm install --save-dev babel-preset-es2015-loose-rollup and ensure .babelrc uses exact string.
Error: Plugin/Cannot find preset 'es2015-loose-rollup' relative to directory ...
Preset not in node_modules or misconfigured path.
fix
Install the preset locally and check that .babelrc is in the correct root directory.
Requiring the preset directly in code throws 'Preset must be a string' or similar.
Passing the required module instead of the preset name string in Babel API.
fix
Use presets: ['es2015-loose-rollup'] not presets: [require('babel-preset-es2015-loose-rollup')].
Babel 7: Error: [BABEL] unknown preset: es2015-loose-rollup (While processing preset: ...)
Using Babel 7 + babel-preset-es2015-loose-rollup which is incompatible.
fix
Upgrade to @babel/preset-env.
Upgrade
Version history
7.0.0latest on npm
Audit
Dependencies
babel-preset-es2015-looserequiredProvides loose mode transformations for ES2015
babel-preset-es2015-rolluprequiredOptimizes ES2015 modules for Rollup tree-shaking
Agent activity
5 hits · last 30 days
node
4
Resources
babel-preset-es2015-loose-rollup — npm install babel-preset-es2015-loose-rollup · libregistry