-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
browser
value from $app/environment
shows the wrong value in the server environment
#8082
Comments
@gtm-nayan Yes, that is true that those adapters tell esbuild to build for a browser but should not tell that the current code is running in the server or the browser. The problem is this causes an error in the worker script when trying to render the component to an HTML string i.e. when we want to use the https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/app/navigation.js#L13-L15 |
Describe the bug
The
browser
value from$app/environment
should befalse
in a server environment but the value istrue
. This issue appears in@sveltejs/kit 1.0.0-next.580
and later versions. It prevents some features (e.g.$app/navigation
and$page
) from working and the error occurs in some serverless adapters.Reproduction
Rollback to
@sveltejs/kit 1.0.0-next.579
Logs
System Info
Severity
blocking an upgrade
Additional Information
I thought that this problem is related to #8047 and #7950.
The text was updated successfully, but these errors were encountered: