欢迎阅读『Tag标签列表』

webpack严格模式!!!忽略

1. babel5

babel: {
    options: {
        blacklist: ["useStrict"],
        // ...
    },
    // ...
}

  

2. babel6

修改.babelrc

略过模块:

{
  presets: [
    ["es2015", { "modules": false }]
  ]
}

  略过某个文件:

{
  "presets": ["es2015"],
  "ignore": [
    "./src/js/directive/datePicker.js"
  ]
}

3. babel-plugin-transform-remove-strict-mode

加装这个外挂: https://www.npmjs.com/package...

其他参考:

http://stackoverflow.com/ques...

http://babeljs.io/docs/plugin...

https://github.com/shanggqm/b...

posted @ 2019-02-15 19:19  兔子零-A酱  阅读(1294)  评论(0编辑  收藏  举报