mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-05-31 13:24:02 +00:00
更新配置
This commit is contained in:
parent
d712298fd5
commit
a2fd2f3abc
@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"test": "electron ./"
|
||||
"run-desktop": "electron ./"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
0
source/.env
Normal file
0
source/.env
Normal file
0
source/.env.development
Normal file
0
source/.env.development
Normal file
0
source/.env.production
Normal file
0
source/.env.production
Normal file
@ -4,9 +4,9 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"build-watch": "vue-cli-service build --watch"
|
||||
"build-dev": "vue-cli-service build --mode dev --watch",
|
||||
"build-prod": "vue-cli-service build -mode prod",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.6.5",
|
||||
|
@ -1,5 +1,35 @@
|
||||
const Copy = require("./plugins/copy");
|
||||
const Path = require("path");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
console.log("***env: ", process.env.NODE_ENV);
|
||||
let configureWebpack = {};
|
||||
switch (process.env.NODE_ENV) {
|
||||
case "development": {
|
||||
configureWebpack = {
|
||||
mode: "development",
|
||||
devtool: "#source-map",
|
||||
};
|
||||
break;
|
||||
}
|
||||
case "production": {
|
||||
configureWebpack = {
|
||||
mode: "production",
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true, // 移除console
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
publicPath: "/",
|
||||
outputDir: "dist",
|
||||
@ -27,8 +57,5 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
mode: "development",// production
|
||||
devtool: "#source-map",
|
||||
}
|
||||
configureWebpack,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user