-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
94 lines (93 loc) · 3.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
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
88
89
90
91
92
93
94
module.exports = {
assetsDir: 'assets',
runtimeCompiler: true,
configureWebpack: {
node: {
__dirname: true,
__filename: false
},
resolve: {
alias: {
'@grpc/proto-loader': 'webpack-proto-loader'
}
},
module: {
rules: [
{
test: /\.(png|jpe?g|gif|webp)(\?.*)?$/,
use: [
{
loader: 'url-loader',
options: {
fallback: {
loader: 'file-loader',
options: {
name: 'assets/img/[name].[ext]'
}
}
}
}
]
},
{
test: /\.(svg)(\?.*)?$/,
use: [
{
loader: 'file-loader',
options: {
name: 'assets/img/[name].[ext]'
}
}
]
},
]
}
},
pluginOptions: {
nodeModulesPath: ['../../node_modules', './node_modules'],
externals: ['@grpc/proto-loader'],
electronBuilder: {
builderOptions: {
win: {
icon: './public/icons/icon.ico',
artifactName: '${productName}-${version}-win64.${ext}'
},
linux:{
icon: './public/icons/512x512.png',
artifactName: '${productName}-${version}-linux.${ext}',
category: 'Utility'
},
mac: {
icon: './public/icons/icon.icns',
artifactName: '${productName}-${version}-osx.${ext}'
},
files: [
'**/*',
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}",
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
"!**/node_modules/*.d.ts",
"!**/node_modules/.bin",
"!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}",
"!.editorconfig",
"!**/._*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}",
"!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}",
"!**/{appveyor.yml,.travis.yml, circle.yml}",
"!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}",
{
from:
'../../node_modules/protobufjs/google/protobuf',
to: 'node_modules/protobufjs/dist/google/protobuf',
},
],
extraResources: [
{
from:
'node_modules/etcd3/lib/proto',
to: 'proto',
}
]
},
},
},
};