-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
41 lines (39 loc) · 999 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
33
34
35
36
37
38
39
40
41
// vue.config.js
const path = require('path')
module.exports = {
pages: {
index: 'src/demos/default/main.js'
},
css: {
extract: false
},
configureWebpack: {
output: {
// libraryExport: 'default',
libraryTarget: 'umd'
}
},
chainWebpack: config => {
const svgSpriteModule = path.resolve(__dirname, './src/vcytoscape/assets/svgs')
const svgRule = config.module.rule('svg')
svgRule
.exclude.add(svgSpriteModule)
.end()
const svgSpriteRule = config.module.rule('svg-sprite')
svgSpriteRule.uses.clear()
svgSpriteRule
.test(/\.svg$/)
.include.add(svgSpriteModule)
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
},
publicPath: process.env.NODE_ENV === 'production'
? '/vcytoscape/demo/' // GitHub Pages
: '/',
indexPath: 'index.html',
lintOnSave: false //如果为false,就是取消eslint规则的检查
}