babel-preset-es2015-loose-rollup

raw JSON →
7.0.0 verified Sat Apr 25 auth: no javascript deprecated

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.

error Error: Cannot find module 'babel-preset-es2015-loose-rollup'
cause 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 Error: Plugin/Cannot find preset 'es2015-loose-rollup' relative to directory ...
cause Preset not in node_modules or misconfigured path.
fix
Install the preset locally and check that .babelrc is in the correct root directory.
error Requiring the preset directly in code throws 'Preset must be a string' or similar.
cause 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')].
error Babel 7: Error: [BABEL] unknown preset: es2015-loose-rollup (While processing preset: ...)
cause Using Babel 7 + babel-preset-es2015-loose-rollup which is incompatible.
fix
Upgrade to @babel/preset-env.
deprecated This 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.
breaking Version 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.
gotcha Loose 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.
gotcha The 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.
npm install babel-preset-es2015-loose-rollup
yarn add babel-preset-es2015-loose-rollup
pnpm add babel-preset-es2015-loose-rollup

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

{
  "presets": ["es2015-loose-rollup"]
}