|
@@ -43,15 +43,16 @@ let proxy = {
|
|
|
|
|
|
var webpack = require("webpack");
|
|
var webpack = require("webpack");
|
|
|
|
|
|
-const plugins = [];
|
|
|
|
|
|
+// const plugins = [];
|
|
// Ignore all locale files of moment.js
|
|
// Ignore all locale files of moment.js
|
|
// TODO: use webpack stats to check if iview locale matters
|
|
// TODO: use webpack stats to check if iview locale matters
|
|
-plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment|iview$/));
|
|
|
|
-if (process.env.NODE_ENV === "production") {
|
|
|
|
- plugins.push("transform-remove-console");
|
|
|
|
-}
|
|
|
|
|
|
+// plugins.push();
|
|
|
|
+// if (process.env.NODE_ENV === "production") {
|
|
|
|
+// plugins.push("transform-remove-console");
|
|
|
|
+// }
|
|
|
|
|
|
module.exports = {
|
|
module.exports = {
|
|
|
|
+ lintOnSave: process.env.NODE_ENV !== "production" ? true : "error",
|
|
devServer: {
|
|
devServer: {
|
|
proxy
|
|
proxy
|
|
},
|
|
},
|
|
@@ -68,6 +69,6 @@ module.exports = {
|
|
.end();
|
|
.end();
|
|
},
|
|
},
|
|
configureWebpack: {
|
|
configureWebpack: {
|
|
- plugins
|
|
|
|
|
|
+ plugins: [new webpack.IgnorePlugin(/^\.\/locale$/, /moment|iview$/)]
|
|
}
|
|
}
|
|
};
|
|
};
|