-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
32 lines (31 loc) · 1.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
/* eslint-disable @typescript-eslint/no-var-requires */
const StyleLintPlugin = require('stylelint-webpack-plugin')
const ThreadsPlugin = require('threads-plugin')
const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin')
const ExternalsPlugin = require('webpack/lib/ExternalsPlugin')
/* eslint-enable @typescript-eslint/no-var-requires */
module.exports = {
configureWebpack: {
devtool: 'source-map',
plugins: [
new StyleLintPlugin({
files: ['src/**/*.{vue,htm,html,css,sss,less,scss,sass}']
})
]
},
pluginOptions: {
electronBuilder: {
preload: { 'preload': 'src/preload.js' },
mainProcessWatch: ['src/backends/*.ts', 'src/*.ts', 'src/preload.js'],
externals: ['segfault-handler'],
chainWebpackMainProcess: (config) => {
config.plugin('threads').use(ThreadsPlugin, [{
plugins: [
new NodeTargetPlugin(),
new ExternalsPlugin('commonjs', ['bindings', 'beamcoder', 'torch-js'])
]
}])
}
}
}
}