Get the App
SLTechnology News&Howtos  ›  Development  › 

How to customize the address setting @ by vue

Shulou Source: shulou.com Published: 2022-06-01 02:57:00 09月22日 Update

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!

Tags: Articles addresses values interests preceding items and at the same time documents more friends purposes knowledge editing industry information information channels paths channels references learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Microsoft Shulou Technology Docker Shulou Information