Vuepress是否可以访问Vue路径中使用的@或〜符号?

时间:2018-08-21 09:17:25

标签: vuepress

Vuepress是否可以访问Vue路径中使用的@或〜符号?

我的意思是我可以做些什么:

import Hello from '@/components/Hello' 

而不是

import Hello from '../../components/Hello' 

1 个答案:

答案 0 :(得分:0)

文档刚刚更改以反映这一点:

https://vuepress.vuejs.org/guide/markdown.html#import-code-snippets

TIP

Since the import of the code snippets will be executed before webpack compilation, you can't use the path alias in webpack. The default value of @ is process.cwd().