删除“使用严格”指令
安装
$ npm install babel-plugin-transform-remove-strict-mode
用法
通过.babelrc
(推荐)
.babelrc
{ "plugins": ["transform-remove-strict-mode"] }
通过CLI
$ babel --plugins transform-remove-strict-mode script.js
通过节点API
require("babel-core").transform("code", { plugins: ["transform-remove-strict-mode"] });