-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix Formatting and Update Dynamic Image Import Recipe for Vite 5 #5898
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Hello @Princesseuh! I was instructed to loop you in on this to ensure its accuracy. Please let me know if everything is A-OK! Thanks in advance for your time. |
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 a lot @VoxelMC!
I have one quick comment, but after running through the whole thing, verifying types and formatting, this looks good to me!
I would recommend adding error handling to this: |
Good call. I'll spin up an issue quickly to track this |
* Fixes formatting and update according to v4 * Update src/content/docs/en/recipes/dynamically-importing-images.mdx --------- Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
Description (required)
As of Astro v4.0, which now uses Vite 5, the
import.meta.glob<>()
API no longer returnsany
and now returnsunknown
unless a generic is specified. This PR updates the dynamic image import recipe to reflect these changes. It also fixes indentation and unnecessary whitespace in the recipe.Affected page: Modified
Related issues & labels (optional)