Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

vue-cli 生成的模板中有一个@,是什么意思?

1. 生成模板命令

vue-cli init webpack

2.生成之后有这么一段代码

import Hello from '@/components/Hello'

3. 问题

在这里@是与../一样吗,指上级目录,还是有其他的什么意思?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

模板webpack里的配置

alias: {
    //...
    '@': resolve('src')
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...