feat: perfect migrate to @vue/cli-service, upgrade vue babel version
1. update to @vue/cli-service@3.0.5, @babel/core@7.0.0 2. use vue-cli service replace config file in build/ and config/ 3. upgrade vue and babel configuration 4. solve the svg-sprite config problem #980 refs: #932 #1087 #980 #1056
This commit is contained in:
38
vue.config.js
Normal file
38
vue.config.js
Normal file
@@ -0,0 +1,38 @@
|
||||
'use strict'
|
||||
require('@babel/register')
|
||||
const path = require('path')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
devServer: {
|
||||
open: true
|
||||
},
|
||||
configureWebpack: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'$@': resolve('src/components')
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.svg$/,
|
||||
loader: 'svg-sprite-loader',
|
||||
include: [resolve('src/icons')],
|
||||
options: {
|
||||
symbolId: 'icon-[name]'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/icons'))
|
||||
.end()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user