-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathvue.config.js
32 lines (31 loc) · 931 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
const os = require('os')
const path = require('path')
module.exports = {
parallel: true,
productionSourceMap: false,
chainWebpack: config => {
/*
* the default loaders for worker files must be disabled. Otherwise both the default and the loaders defined below
* will be applied to worker files. See also: https://github.com/vuejs/vue-cli/issues/2028
*/
config.module.rule('js').exclude.add(/\.worker\.js$/)
config.module.rule('ts').exclude.add(/\.worker\.ts$/)
},
configureWebpack: {
// devtool: 'source-map',
module: {
rules: [
{
test: /\.worker\.js$/,
include: path.resolve(__dirname, 'src'),
use: [{ loader: 'worker-loader' }],
},
{
test: /\.worker\.ts$/,
include: path.resolve(__dirname, 'src'),
use: [{ loader: 'worker-loader' }, { loader: 'ts-loader' }],
},
],
},
},
}