使用babel進行es6轉es5時,默認轉化之后是嚴格模式,有些時候我們想去除嚴格模式。
解決方法如下
安裝 babel-plugin-transform-remove-strict-mode 依賴
安裝方法:npm install babel-plugin-transform-remove-strict-mode
修改 .babelrc文件 如下:
{
"plugins"
: [
"transform-remove-strict-mode"
]
}
執行即可。
