forked from mscraftsman/devcon2020
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
21 lines (19 loc) · 695 Bytes
/
vue.config.js
File metadata and controls
21 lines (19 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module.exports = {
chainWebpack(config) {
// Only convert .svg files that are imported by these files as Vue component
const FILE_RE = /\.(vue|js|ts|svg)$/;
// Use vue-cli's default rule for svg in non .vue .js .ts files
config.module.rule("svg").issuer(file => !FILE_RE.test(file));
// Use our loader to handle svg imported by other files
config.module
.rule("svg-component")
.test(/\.svg$/)
.issuer(file => FILE_RE.test(file))
.use("vue")
.loader("vue-loader")
.end()
.use("svg-to-vue-component")
.loader("svg-to-vue-component/loader");
},
publicPath: process.env.NODE_ENV === "ghpages" ? "/devcon2020/" : "/"
};