forked from aleksey-hoffman/sigma-file-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
109 lines (108 loc) · 2.69 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const CopyPlugin = require('copy-webpack-plugin')
module.exports = {
configureWebpack: {
resolve: {
// Needed for 'ws' and similar modules
mainFields: ['main', 'browser']
},
output: {
filename: '[name].bundle.js'
},
module: {
rules: [
{
test: /\.worker\.(c|m)?js$/,
loader: 'worker-loader'
},
{
test: /.node$/,
loader: 'node-loader'
}
]
},
plugins: [
new CopyPlugin([
{from: './src', to: 'src'}
])
],
},
pages: {
index: {
entry: 'src/electronRenderer.js'
}
},
pluginOptions: {
electronBuilder: {
builderOptions: {
appId: 'com.alekseyhoffman.sigma-file-manager',
icon: 'build/icon.png',
productName: 'Sigma file manager',
copyright: 'Copyright © 2021 - present Aleksey Hoffman',
win: {
target: [
{target: 'nsis'}
]
},
linux: {
target: [
{target: 'AppImage'}
// {target: 'snap'}
],
icon: 'build/icon.png',
category: 'System;FileTools',
maintainer: 'Aleksey Hoffman'
},
mac: {
target: 'pkg'
},
nsis: {
installerIcon: 'build/icon.ico',
uninstallerIcon: 'build/icon.ico',
artifactName: 'Sigma-File-Manager-${version}-Windows-Setup.${ext}',
oneClick: true
},
appImage: {
artifactName: 'Sigma-File-Manager-${version}-Linux-Debian.${ext}',
},
pkg: {
artifactName: 'Sigma-File-Manager-${version}-MacOS-Setup.${ext}',
},
files: [
'**/*',
'!**/resources${/*}',
'**/resources/${platform}/**',
'**/resources/media/**'
]
},
nodeIntegration: true,
mainProcessFile: 'src/electronMain.js',
// Files that should trigger process re-build on change.
mainProcessWatch: [
'./src/utils/downloadManager.js',
'./src/utils/search.js'
],
// Exclude dependencies from the output bundles
externals: [
'chokidar',
'fsevents',
'xxhash-addon',
'fswin',
'trammel'
],
// Webpack config for electron renderer process only
chainWebpackRendererProcess: (config) => {
config.plugin('define').tap(args => {
args[0]['process.env.FLUENTFFMPEG_COV'] = false
return args
})
},
chainWebpackMainProcess: config => {
config.module
.rule('babel-main-process')
.test(/\.js$/)
.use('babel')
.loader('babel-loader')
}
}
}
}