使用babel进行es6转es5时,默认转化之后是严格模式,有些时候我们想去除严格模式。

解决方法如下

安装 babel-plugin-transform-remove-strict-mode 依赖

安装方法:npm install babel-plugin-transform-remove-strict-mode

 

修改 .babelrc文件  如下:

{

  "plugins": ["transform-remove-strict-mode"]
}
 
执行即可。

 

相关文章:

  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
  • 2021-04-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2021-09-19
相关资源
相似解决方案