-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
44 lines (39 loc) · 1.12 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
const path = require('path')
module.exports = {
chainWebpack: config => {
// 自訂網站標題: https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-plugin
config
.plugin('html')
.tap(args => {
args[0].title = 'Simple Twitter'
return args
})
// 在Vue中使用SVG: https://ithelp.ithome.com.tw/articles/10230334
config.module.rules.delete('svg')
config.module
.rule('svg-sprite-loader')
.test(/\.svg$/)
.include
.add(path.resolve('src/assets/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({ symbolId: 'svg-icon-[name]' })
config.module
.rule('images')
.exclude.add(path.resolve('src/assets/icons'))
},
// 部屬到Github Page設定
publicPath: process.env.NODE_ENV === 'production'
? '/ac-twitter/'
: '/'
// },
// // 設定CSS全域變數: https://cli.vuejs.org/guide/css.html#passing-options-to-pre-processor-loaders
// css: {
// loaderOptions: {
// scss: {
// additionalData: '@import "~@/styles/config.scss";'
// }
// }
// }
}