特别提醒修改vue.config.js后需要重启项目
module.exports = {
configureWebpack: {
resolve: {
alias: {
'assets': '@/assets',
'common': '@/common',
'components': '@/components',
'network': '@/network',
'views': '@/views',
}
}
}
}
使用:
另外需要注意的是如果是在HTML中使用需要加个 ~ 波浪线即:
.editorconfig文件夹下
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true