upd: 更新web端webpack配置

master
shuxiaokai 3 years ago
parent b265205ad7
commit 030c0ed1eb

@ -7,6 +7,7 @@ const path = require("path");
process.env.VUE_APP_TITLE = "moyu"; process.env.VUE_APP_TITLE = "moyu";
process.env.VUE_APP_BUILD_TIME = new Date().toLocaleString(); process.env.VUE_APP_BUILD_TIME = new Date().toLocaleString();
module.exports = { module.exports = {
pages: { pages: {
index: { index: {
@ -39,10 +40,11 @@ module.exports = {
"~": path.resolve(__dirname, "./"), "~": path.resolve(__dirname, "./"),
}, },
}, },
target: "web"
}, },
pluginOptions: { pluginOptions: {
electronBuilder: { electronBuilder: {
contextIsolation: false, // contextIsolation: false,
nodeIntegration: true, //参考https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html nodeIntegration: true, //参考https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html
extends: null, extends: null,
externals: [ externals: [
@ -116,5 +118,5 @@ module.exports = {
//=====================================打包上线配置====================================// //=====================================打包上线配置====================================//
publicPath: "/", publicPath: "/",
outputDir: "dist", //输出文件类型 outputDir: "dist", //输出文件类型
productionSourceMap: true, //打包时候js是否添加sourceMap productionSourceMap: false, //打包时候js是否添加sourceMap
}; };

Loading…
Cancel
Save