Vue CLI3别名创建
新建vue.config.js文件
module.exports = {
configureWebpack: {
resolve: {
// extension: []
// 别名配置 脚手架3已经把src配置为@
alias: {
'assets': '@/assets',
'common': '@/common',
'components': '@/components',
'network': '@/network',
'views': '@/views',
}
}
}
}
规范代码editorconfig
脚手架3中editorconfig删除了,新建一个
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true