-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SSR][import.meta.glob
] Resolve glob patterns starting with /
to root
#1875
Comments
brillout
added a commit
to brillout/vite
that referenced
this issue
Mar 27, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Mar 27, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Mar 28, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Apr 11, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Apr 11, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Apr 11, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Apr 11, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Apr 23, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
May 4, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
May 19, 2021
tests vitejs#2390 and vitejs#1875 amongst others
brillout
added a commit
to brillout/vite
that referenced
this issue
Jul 16, 2021
tests vitejs#2390 and vitejs#1875 amongst others
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is your feature request related to a problem? Please describe.
This makes sense in the context of building a custom SSR implementation: the code defining the glob pattern lives in the same file structure than the files being glob imported.
But this is not the case for SSR frameworks. The glob pattern is defined by the SSR framework, and the SSR framework code lives in antoher file structure than the user's app code.
Going from the SSR framework's file structure to the user's file structure using a relative path is brittle.
Describe the solution you'd like
Allow Glob patterns to start with
/
, which Vite then resolves relative to the root. For exampleimport.meta.glob('/pages/*.vue')
orimport.meta.glob('/**/*.page.*')
.The text was updated successfully, but these errors were encountered: