babel-plugin-transform-jscript
This plugin allows Babel to transform named function expressions into function declarations to get around some particularly nasty JScript bugs related to name function expressions.
Example
In
var { };
Out
"use strict"; var foo = { {} return bar;};
Installation
npm install --save-dev babel-plugin-transform-jscript
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
babel --plugins transform-jscript script.js
Via Node API
;