-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvue.config.js
87 lines (81 loc) · 2.96 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const path = require('path');
function resolve(dir){
return path.join(__dirname,dir);
}
module.exports = {
publicPath:'./',
devServer:{
host:'0.0.0.0',
port:'8081'
},
chainWebpack:config => {
config.resolve.alias
.set('@',resolve('src'))
.set('src',resolve('src'))
.set('common',resolve('src/common'))
.set('components',resolve('src/components'));
},
pluginOptions: {
electronBuilder: {
builderOptions: {
"productName": "AppDemo",
"appId": "electron.demo",
"directories":{
"output":"./dist"
},
"publish":[
{
"provider":"generic",
"url":"http://..../bbbb/"
}
],
"extraResources": [
{
"from": "./public/resources/TestDll.dll",
"to": "./"
}
],
"mac": {
"icon": "./public/app.ico",
"gatekeeperAssess": false
},
"win": {
"icon": "./public/app.ico"
},
"linux": {
"icon": "./public/app.ico"
},
"nsis": {
"oneClick": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"installerIcon": "./public/app.ico",
"uninstallerIcon": "./public/app.ico",
"installerHeaderIcon": "./public/app.ico",
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"shortcutName": "APP"
}
},
externals: ['electron-edge-js'], //electron-edge-js调用dll
nodeIntegration: true, ////处理(xxx.vue import { ipcRenderer } from 'electron')__fs.existsSync is not a function
}
}
}
/**
* "productName":"aDemo",//项目名,也是生成的安装文件名,即aDemo.exe
* "copyright":"Copyright © 2019",//版权信息
*
* "publish":[{"provider":"generic","url":"http://..../bbbb/"}],版本更新
*
* "oneClick": false, // 是否一键安装
* "allowElevation": true, // 允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序。
* "allowToChangeInstallationDirectory": true, // 允许修改安装目录
* "installerIcon": "./shanqis.ico",// 安装图标
* "uninstallerIcon": "./shanqis.ico",//卸载图标
* "installerHeaderIcon": "./shanqis.ico", // 安装时头部图标
* "createDesktopShortcut": true, // 创建桌面图标
* "createStartMenuShortcut": true,// 创建开始菜单图标
* "shortcutName": "demo", // 图标名称
*/
// "files": ["public/**/*"], //将public文件夹一并打包