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:
zthxxx
2018-10-20 01:58:26 +08:00
parent 6c967f177a
commit 112823227c
21 changed files with 73 additions and 801 deletions

38
vue.config.js Normal file
View 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()
}
}