babel插件转换删除严格模式
1.下载删除“使用严格”指令
npm install babel-plugin-transform-remove-strict-mode -S
.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"]
});