Note: @ is defined by default in the vue project to represent the path of the src folder.
Create a new vue.config.js file:
const path = require('path')
const resolve = dir => {
return path.join(__dirname, dir)
}
module.exports = {
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('_v', resolve('src/views'))
}
}