-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvue.config.js
75 lines (73 loc) · 2.36 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
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
publicPath:'./',
configureWebpack:{
entry: {
app: './src/electron-renderer/main.ts'
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
options: {
appendTsSuffixTo: [/\.vue$/],
}
}
]
},
resolve: {
extensions: ['.ts', '.tsx','js','json'],
fallback:{path:require.resolve("path-browserify")}
}
},
pluginOptions:{
electronBuilder: {
//nodeIntegration: true,
//disableMainProcessTypescript: false,
mainProcessFile:'src/electron-main/background.js',
contextIsolation: true,
customFileProtocol: './',
preload: 'src/electron-main/preload.js',
builderOptions: {
fileAssociations: {
ext: ["md","markdown","mmd","mdown","mdtxt","mdtext"],
name: "Markdown",
description: "Markdown document",
icon: "./resource/icons/md.png"
},
nsis: { //nsis安装器配置
oneClick: false, // 是否需要点击安装,自动更新需要关掉
allowToChangeInstallationDirectory:true, //是否能够选择安装路径
//installerIcon:"./resource/icons/yali.ico",// 安装程序图标(最好用256 × 256以上的图标)
//uninstallerIcon:"./resource/icons/yali.ico",//卸载程序图标(最好用256 × 256以上的图标)
perMachine: false,
createDesktopShortcut: true, // 创建桌面图标
//createStartMenuShortcut: true,// 创建开始菜单图标
//license:"./src/license/license.html" //安装界面的软件许可证,如果不配置,不会出现软件许可证界面
},
win:{
artifactName: "yali-${arch}-win.${ext}",
icon: './resource/icons/yali.png',
target: [
{
target: "nsis", // 输出目录的方式
arch: ["x64","ia32"], //机型
},
{
target: "zip",
arch: ["x64","ia32"]
}
],
//requestedExecutionLevel: "asInvoker"
},
/*electronDownload: {
customDir: `v13.0.0`,
},*/
}
}
}
})