mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-06-01 22:04:01 +00:00
更新配置
This commit is contained in:
parent
d712298fd5
commit
a2fd2f3abc
@ -4,7 +4,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "electron ./"
|
"run-desktop": "electron ./"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"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,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build-dev": "vue-cli-service build --mode dev --watch",
|
||||||
"lint": "vue-cli-service lint",
|
"build-prod": "vue-cli-service build -mode prod",
|
||||||
"build-watch": "vue-cli-service build --watch"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
|
@ -1,5 +1,35 @@
|
|||||||
const Copy = require("./plugins/copy");
|
const Copy = require("./plugins/copy");
|
||||||
const Path = require("path");
|
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 = {
|
module.exports = {
|
||||||
publicPath: "/",
|
publicPath: "/",
|
||||||
outputDir: "dist",
|
outputDir: "dist",
|
||||||
@ -27,8 +57,5 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack,
|
||||||
mode: "development",// production
|
|
||||||
devtool: "#source-map",
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user