-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
48 lines (45 loc) · 1.07 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
// eslint-disable-next-line import/no-extraneous-dependencies
const webpack = require('webpack');
module.exports = {
publicPath: process.env.VUE_APP_PREFIX || '/',
configureWebpack: {
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
},
},
plugins: [
new webpack.DefinePlugin({
// generate hash for cache busting
__CACHE_HASH__: Date.now().toString(),
})
]
},
css: {
loaderOptions: {
scss: {
prependData: `@import "~@/styles/variables.scss";`,
}
},
},
// to be able to use npm link with base-ui-components
chainWebpack: (config) => {
config.resolve.symlinks(false);
// add vue-svg-loader
const svgRule = config.module.rule('svg');
svgRule.uses.clear();
svgRule
.oneOf('inline')
.resourceQuery(/inline/)
.use('vue-svg-loader')
.loader('vue-svg-loader')
.end()
.end()
.oneOf('external')
.use('file-loader')
.loader('file-loader')
.options({
name: 'assets/[name].[hash:8].[ext]',
});
}
};