You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Describe the bug
My
vite.config.js
has an alias:So I can import components like
import MyCmp from '@/components/MyCmp.vue'
.But when I use
import.meta.glob('@/components/global/*.vue')
Vite doesn't recognize the alias and error out with the message:It seems that Vite already knows that aliases do not work with
import.meta.glob
and says that pattern must start with "." or "/".So if this is not a bug then this issue is a feature request to support aliases on
import.meta.glob
.Reproduction
https://stackblitz.com/edit/vitejs-vite-ojnnbh?devtoolsheight=33&file=src/main.js
System Info
Used Package Manager
npm
Logs
![image](https://user-images.githubusercontent.com/18482346/153714718-effc9a5c-19e7-4441-8777-5c80501b3b1a.png)
Validations
The text was updated successfully, but these errors were encountered: