-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the bug
In Svelte 5, using import.meta.env crashes the application if there is a prop named meta in the component. The same issue happens with import.meta.glob.
Firefox says: Uncaught (in promise) TypeError: import.meta is not a function
Chrome says: Uncaught (in promise) TypeError: (intermediate value) is not a function
When this error happens, my SvelteKit site shows a blank page.
Reproduction
This is a minimum version of my <MetaTags> component. With Svelte 4, REPL says just undefined but that’s fine, my code has no error. But with Svelte 5, this no longer works. I need to rename the prop. Uncommenting export let meta = {}; removes the error, saying undefined like Svelte 4.
Logs
No response
System Info
-Severity
blocking an upgrade