forked from skromez/redstone-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
48 lines (46 loc) · 1.19 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
const path = require('path');
module.exports = {
productionSourceMap: true,
chainWebpack: config => {
// Existing vue-loader configuration
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.compiler = require('vue-template-babel-compiler')
return options
});
// Configuration for handling node_modules, excluding core-js
config.module
.rule('babel-for-node-modules')
.test(/\.m?js$/)
.include
.add(path.resolve(__dirname, 'node_modules'))
.end()
.exclude
.add(/core-js/)
.end()
.use('babel-loader')
.loader('babel-loader')
.options({
presets: [
['@babel/preset-env', { modules: 'auto' }]
],
plugins: [
'@babel/plugin-proposal-private-methods',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-modules-commonjs'
]
});
// Add alias configuration
config.resolve.alias
.set('@', path.resolve(__dirname, 'src'));
},
configureWebpack: {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
}
}
}