{"id":19279,"library":"babel-preset-es2015-loose-rollup","title":"babel-preset-es2015-loose-rollup","description":"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.","status":"deprecated","version":"7.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/frostney/babel-preset-es2015-loose-rollup","tags":["javascript","babel","preset","es2015","loose","rollup"],"install":[{"cmd":"npm install babel-preset-es2015-loose-rollup","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-es2015-loose-rollup","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-es2015-loose-rollup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides loose mode transformations for ES2015","package":"babel-preset-es2015-loose","optional":false},{"reason":"Optimizes ES2015 modules for Rollup tree-shaking","package":"babel-preset-es2015-rollup","optional":false}],"imports":[{"note":"Presets are configured via .babelrc or programmatic API, not directly imported as module.","wrong":"// Using require in code: const preset = require('babel-preset-es2015-loose-rollup')","symbol":"default","correct":"// In .babelrc: \"presets\": [\"es2015-loose-rollup\"]"},{"note":"Preset name must match exactly. Babel 6 only; for Babel 7 use @babel/preset-env with options.","wrong":"// Wrong: 'es2015-loose-rollup' misspelled or using old 'es2015' prefix","symbol":"name","correct":"// Correct preset name string: 'es2015-loose-rollup'"},{"note":"Preset names are strings, not required modules, in Babel 6 API.","wrong":"// Common mistake: passing object instead of string: require('babel-core').transform(code, { presets: [require('babel-preset-es2015-loose-rollup')] })","symbol":"config","correct":"require('babel-core').transform(code, { presets: ['es2015-loose-rollup'] })"}],"quickstart":{"code":"{\n  \"presets\": [\"es2015-loose-rollup\"]\n}","lang":"javascript","description":"Shows how to configure the preset in .babelrc for Babel 6 with Rollup."},"warnings":[{"fix":"Replace with @babel/preset-env and set modules to false.","message":"This package is deprecated in favor of @babel/preset-env with \"modules\": false for Rollup tree-shaking.","severity":"deprecated","affected_versions":"*"},{"fix":"Use @babel/preset-env for Babel 7 projects.","message":"Version 7.0.0 does not correspond to Babel 7; it is still for Babel 6 and will not work with Babel 7.","severity":"breaking","affected_versions":"7.0.0"},{"fix":"Avoid loose mode unless you fully understand the implications and test thoroughly.","message":"Loose mode may produce code that is not spec-compliant, potentially breaking edge cases.","severity":"gotcha","affected_versions":"*"},{"fix":"Use @babel/preset-env with appropriate module format for other bundlers.","message":"The preset is specifically for use with Rollup; using with other bundlers may not yield tree-shaking benefits.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev babel-preset-es2015-loose-rollup and ensure .babelrc uses exact string.","cause":"Preset name typo or not installed locally or globally.","error":"Error: Cannot find module 'babel-preset-es2015-loose-rollup'"},{"fix":"Install the preset locally and check that .babelrc is in the correct root directory.","cause":"Preset not in node_modules or misconfigured path.","error":"Error: Plugin/Cannot find preset 'es2015-loose-rollup' relative to directory ..."},{"fix":"Use presets: ['es2015-loose-rollup'] not presets: [require('babel-preset-es2015-loose-rollup')].","cause":"Passing the required module instead of the preset name string in Babel API.","error":"Requiring the preset directly in code throws 'Preset must be a string' or similar."},{"fix":"Upgrade to @babel/preset-env.","cause":"Using Babel 7 + babel-preset-es2015-loose-rollup which is incompatible.","error":"Babel 7: Error: [BABEL] unknown preset: es2015-loose-rollup (While processing preset: ...)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}