VueCli3 @路径设置
1.最外层目录创建文件vue.config.js2.加入如下代码let path = require('path')function resolve (dir) {return path.join(__dirname, dir)}module.exports = {chainWebpack: config => {config.resolve.alias.set('@', resolve('
·
1.最外层目录创建文件vue.config.js
2.加入如下代码
let path = require('path')
function resolve (dir) {
return path.join(__dirname, dir)
}
module.exports = {
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
}
}
更多推荐
已为社区贡献2条内容
所有评论(0)