{"id":19287,"library":"babel-preset-es2015-without-strict","title":"babel-preset-es2015-without-strict","description":"A Babel preset that includes all ES2015 plugins (like babel-preset-es2015) but disables the automatic prepending of 'use strict' directives. This is useful when you want ES2015 transpilation without forcing strict mode, for example when combining with other scripts that are not strict-mode compatible or when targeting environments where strict mode causes issues. Version 0.0.4 is the latest and only release; there are no updates, and the preset is now obsolete because Babel 7+ deprecated the es2015 preset in favor of individual plugins or @babel/preset-env. This preset works only with Babel 6.x.","status":"deprecated","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/fancyboynet/babel-preset-es2015-without-strict","tags":["javascript"],"install":[{"cmd":"npm install babel-preset-es2015-without-strict","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-es2015-without-strict","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-es2015-without-strict","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Base preset whose plugins are included without the strict mode plugin.","package":"babel-preset-es2015","optional":true}],"imports":[{"note":"In .babelrc or babel config, use the short name 'es2015-without-strict'. Using the full npm package name is incorrect.","wrong":"{\n  \"presets\": [\"babel-preset-es2015-without-strict\"]\n}","symbol":"default (preset)","correct":"{\n  \"presets\": [\"es2015-without-strict\"]\n}"},{"note":"Pass the preset name as a string; Babel resolves it internally. Passing the required module object is not the standard API.","wrong":"require('babel-core').transform(code, { presets: [require('babel-preset-es2015-without-strict')] });","symbol":"preset via Node API","correct":"require('babel-core').transform(code, { presets: ['es2015-without-strict'] });"},{"note":"CLI expects the preset name without the 'babel-preset-' prefix.","wrong":"babel script.js --presets babel-preset-es2015-without-strict","symbol":"preset via CLI","correct":"babel script.js --presets es2015-without-strict"}],"quickstart":{"code":"// Install\nnpm install --save-dev babel-preset-es2015-without-strict babel-preset-es2015 babel-cli\n\n// .babelrc\n{\n  \"presets\": [\"es2015-without-strict\"]\n}\n\n// Example ES2015 code (input.js)\nconst hello = () => 'Hello World';\nexport default hello;\n\n// Transpile via CLI\nbabel input.js --out-file output.js\n\n// Output will be ES5 without 'use strict'\n\"use strict\"; // this line is omitted\nvar hello = function hello() {\n  return 'Hello World';\n};\nexports.default = hello;","lang":"javascript","description":"Install preset, configure .babelrc, and transpile an ES2015 arrow function/export to ES5 without strict mode directive."},"warnings":[{"fix":"Upgrade to Babel 7 and use @babel/preset-env with the 'modules' and 'strict' options to achieve the same effect.","message":"This preset is for Babel 6 only and is no longer maintained. Babel 7 uses @babel/preset-env which can control strict mode via the 'strict' option.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Add 'babel-polyfill' to your entry point or use @babel/preset-env with 'useBuiltIns'.","message":"The preset does not include any polyfills. You must separately include babel-polyfill or core-js for features like Promises, Map, Set, etc.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Ensure your final bundle is wrapped in a function scope or use a module bundler that adds strict mode per module.","message":"Omitting 'use strict' can lead to issues when transpiled code is concatenated with other scripts that rely on strict mode. In non-strict mode, 'this' in functions defaults to the global object, which can cause bugs.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Downgrade to Babel 6, or migrate to Babel 7 and use @babel/preset-env with the 'strict' option set to false.","cause":"This preset is incompatible with Babel 7+.","error":"Error: Requires Babel 6.x, but you have Babel 7.x installed."},{"fix":"In Babel 6, add babel-polyfill or babel-plugin-transform-runtime.","cause":"The preset does not include the regenerator runtime for generators/async functions.","error":"ReferenceError: regeneratorRuntime is not defined"},{"fix":"Run 'npm install --save-dev babel-preset-es2015-without-strict' and use 'es2015-without-strict' (without 'babel-preset-' prefix) in config.","cause":"The preset is not installed or the name is misspelled in .babelrc.","error":"Module not found: Can't resolve 'babel-preset-es2015-without-strict'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}