0

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

我的意思是我可以做类似的事情:

import Hello from '@/components/Hello' 

而不是

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

1 回答 1

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().
于 2018-08-22T11:35:37.890 回答