-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Suggest using import.meta.glob #9181
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, @matthewp ! Only two kinds of small changes I've made below:
- Depending on the type of page, some of the links will link to our own Import page entry for
import.meta.glob()
. Only the more reference type pages will link back to Vite directly. This is to give our readers a friendlier explanation, and resources about glob patterns etc. if they're on more "learning" type pages like the guides and tutorial. - The pages that do link back to vite include "Vite's" in the link so that it's clear readers will be taken off the page when they click, and that this is a "Vite thing" ultimately, so they understand that.
Otherwise, this PR is fine, and for Yan and the rest of Team Docs reading, yes, I am aware this means we will have to update the tutorial repo code.
I also think there are more Astro.glob
references in docs. Some of them are error messages that need to be fixed at the source. But sometimes we will have written just the words "Astro.glob" e.g. in the in the frontmatter description of the tutorial 5-astro-api/1.mdx
So, I'm happy after committing these to do a bigger sweep, if you prefer! It might be easier for me to do, since I'll know whether I want to use import.meta.glob()
or "importing with glob patterns" if it shows up somewhere in explanatory text.
Noting that the main pages updated with new text content will be 👍
Most other pages should be updating examples, links etc. |
…API reference goes away
OK, @matthewp ! Thank you for your patience! I went through and caught more instances, updated links etc. The main change occurs here, so if you don't mind previewing it to make sure this section seems OK, that would be great: https://deploy-preview-9181--astro-docs-2.netlify.app/en/guides/imports/#importmetaglob There is stuff there taken from both the When that section looks good to you, I'm happy for this to be merged into the beta branch and the whole thing will be generally proofread/polished etc. before launch week, so no need for this to be perfect yet! |
@sarah11918 look good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is just one problem with one of the examples. I think it hasn't been updated during the transfer from another page. But I am not sure what the best approach is here.
Other than that, it looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK! I think we got everything worked out on this one, so merging in to the beta docs!
!coauthor |
|
Description (required)
Replaces usage of
Astro.glob
withimport.meta.glob
instead.For Astro version:
5.x
. See astro PR #11826.