...webpack @/src
vue.config.js()
@webpackvue-cli
:
...webpack @/src
vue.config.js()
@webpackvue-cli
:
in node_modules/@vue/cli-service/lib/config/base.js
here
.alias
.set('@', api.resolve('src'))
but you should probably take a look at webpack-chain,. If you are interested in vue-cli 3, you can take a look at some of the articles I share and study together
.you can overwrite the configuration by creating a vue.config.js file
module.exports = {
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('assets', resolve('src/assets'))
},
}