webpack嚴格模式!!!忽略

1. babel5

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

  

2. babel6

修改.babelrcjavascript

略過模塊:java

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

  略過某個文件:git

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

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

加裝這個外掛: https://www.npmjs.com/package...github

其餘參考:npm

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

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

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

相關文章
相關標籤/搜索