-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
52 lines (52 loc) · 1.26 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
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path')
module.exports = {
pages: {
index: {
entry: 'src/render/main.ts'
}
},
// 插件配置
pluginOptions: {
// 全局less变量
'style-resources-loader': {
preProcessor: 'less',
patterns: [
path.resolve(__dirname, './src/render/static/common.less')
]
},
electronBuilder: {
nodeIntegration: true, // 启用node集成
mainProcessFile: 'src/main/background.ts', // 入口文件
mainProcessWatch: ['src/main/**/*'], // 监听文件更改
builderOptions: { // electron-builder配置
appId: 'cn.hbcraft.cloudmusic',
productName: '',
files: [
'**/*',
'icon.ico',
'icon-small.ico'
],
icon: 'public/icon.ico',
win: {
icon: 'public/icon.ico'
},
nsis: {
oneClick: false,
perMachine: true,
allowToChangeInstallationDirectory: true,
uninstallDisplayName: '卸载网易云音乐',
shortcutName: '网易云音乐'
}
}
}
},
// 配置webpack
configureWebpack: {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src/render/')
}
}
}
}