-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Svelte 5: import.meta.env
crashes app if meta
prop exists
#14234
Comments
I found the cause of the error; Svelte's compiler uses |
import.meta.env
crashes if meta
prop existsimport.meta.env
crashes app if meta
prop exists
This issue has been resolved, could someone please close it? |
Technically it's not fully closed yet because to be sure everyone gets the update we gotta bump the dependency |
Updated |
Describe the bug
In Svelte 5, using
import.meta.env
crashes the application if there is a prop namedmeta
in the component. The same issue happens withimport.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
REPL: v4.2.19 / v5.1.13
This is a minimum version of my
<MetaTags>
component. With Svelte 4, REPL says justundefined
but that’s fine, my code has no error. But with Svelte 5, this no longer works. I need to rename the prop. Uncommentingexport let meta = {};
removes the error, sayingundefined
like Svelte 4.Logs
No response
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: