打包后移除console.log日志

 打包后移除console.log日志,把项目里所有的的console.log打印移除,这样上线后减少数据风险

 "production":{
      "plugins": ["transform-remove-console"]
    }

 

{
  "presets": [
    ["env", {
      "modules": false
    }],
    "stage-2"
  ],
  "ignore": [ "./src/lib/by-form-editor.umd.js" ],
  "plugins": ["transform-runtime", "transform-vue-jsx",["component", [
    {
      "libraryName": "element-ui"
    }
  ]]],
  "env": {
    "test": {
      "presets": ["env", "stage-2"],
      "plugins": ["transform-es2015-modules-commonjs", "dynamic-import-node"]
    },
    "production":{
      "plugins": ["transform-remove-console"]
    }
  }
}

package.json