-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvue.config.js
39 lines (38 loc) · 917 Bytes
/
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
const { defineConfig } = require('@vue/cli-service')
const nodeExternals = require('webpack-node-externals');
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: {
target: 'electron-renderer',
externals: [nodeExternals()],
devtool: 'source-map',
},
pluginOptions: {
electronBuilder: {
chainWebpackMainProcess: (config) => {
config.module
.rule('node')
.test(/\.node$/)
.use('node-loader')
.loader('node-loader')
.end();
config.devtool('source-map')
},
builderOptions: {
files: [
{
// 包含所有文件
from: '.',
to: '.',
},
{
// 排除 .map 文件
from: '.',
to: '.',
filter: ['**/*', '!**/*.map'],
},
],
},
},
},
})