How to customize the address setting @ by vue
This article mainly introduces how to customize the address setting @ of vue, which has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.
Custom address settings @
Configure files in vue.config.js
const path = require('path')function resolve (dir) { return path.join(__dirname, dir)}module.exports = { chainWebpack: config => { config.resolve.alias .set ('@', resolve ('src')) // key,value Self-defined, e.g..set ('@@', resolve ('src/components')}}@ setting in vue
@ is the path to the current project
Thank you for reading this article carefully. I hope that the article "vue how to customize the address setting @" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!