-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
47 lines (44 loc) · 1.13 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
const PACKAGE_JSON = require('./package.json');
module.exports = {
// css: { extract: false },
/* configureWebpack: {
output: {
libraryExport: 'default',
},
}, */
configureWebpack: {
module: {
rules: [{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto',
}],
},
},
chainWebpack: (config) => {
config.module
.rule('vue')
.use('vue-loader')
.tap((options) => ({
...options,
compilerOptions: {
// treat any tag that starts with ion- as custom elements
isCustomElement: (tag) => tag.startsWith('color-slider'),
},
}));
config.plugin('define')
.tap((args) => {
// eslint-disable-next-line no-param-reassign
args[0]['process.env'].VERSION = JSON.stringify(PACKAGE_JSON.version);
return args;
});
const svgRule = config.module.rule('svg');
svgRule.uses.clear();
svgRule
.use('vue-loader')
.loader('vue-loader-v16') // using a preview support of Vue 3 in Vue CLI
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader');
},
};