Babel plugin that fixes buggy named function expressions in JScript (IE<=8). This is an older Babel 6 plugin (v6.22.0), part of Babel's preset-es2015. It wraps named function expressions in an IIFE to avoid JScript's incorrect hoisting behavior. Not needed for modern browsers or Node.js. The plugin has no active maintenance as Babel 6 is superseded by Babel 7+; alternatives include using @babel/preset-env with the 'ie' target.
npm install babel-plugin-transform-jscriptVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to enable the plugin via .babelrc and shows the transformation of a named function expression to an IIFE to fix JScript hoisting.
Upgrade to Babel 7+ and use @babel/preset-env targeting 'ie 8' or similar.
Ensure your code uses var foo = function bar() {} to be transformed.Run 'npm install babel-plugin-transform-jscript' for Babel 6, or use @babel/plugin-transform-jscript for Babel 7+ (if available) but it's likely not needed.
Ensure 'babel-core' is installed: npm install babel-core
No dependency data recorded yet.