在vue.config.js中写:
const path = require('path')
const resolve = dir => path.join(__dirname, dir)
module.exports = {
baseUrl: './',
runtimeCompiler: true,
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
}
}
网友评论