-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
52 lines (51 loc) · 2.15 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
module.exports = {
configureWebpack: {
// Webpack configuration applied to web builds and the electron renderer process
},
pluginOptions: {
electronBuilder: {
preload: {
// preload: 'src/preload.js',
// 'client-header': 'src/client-header.js',
'webview-inject': 'public/webview-inject.js',
'ritmo-inject': 'public/ritmo-inject.js',
},
nodeIntegration: true,
// List native deps here if they don't work
externals: ['@ffmpeg-installer/ffmpeg', 'electron-prompt'],
mainProcessFile: 'src/main-process/main.js',
builderOptions: {
productName: 'Background Video Player',
extraResources: ['extensions/**/*'],
electronDownload: {
mirror: 'https://github.com/castlabs/electron-releases/releases/download/v',
},
},
chainWebpackMainProcess: (config) => {
// Chain webpack config for electron main process only
// https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/139
config.plugin('define').tap((args) => {
args[0]['process.env.FLUENTFFMPEG_COV'] = false;
return args;
});
config.module
.rule('babel')
.test(
/(main\-process|common|node_modules\/electron\-tween\/electron\-tween).*\.js$/
)
.use('babel')
.loader('babel-loader')
.options({
presets: [['@babel/preset-env', { modules: false }]],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-runtime',
],
});
},
chainWebpackRendererProcess: (config) => {
// Chain webpack config for electron renderer process only (won't be applied to web builds)
},
},
},
};