Where is the configuration under the alias alias @ mapped to / src in Vue-cli 3.0?

clipboard.png

...webpack @/src

vue.config.js()

clipboard.png

@webpackvue-cli

:

clipboard.png


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

.

webpack-configuration-resolve


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'))
    },
}
Menu