$env/dynamic/public
isn't available in hooks.client.js
in prod
#8464
Labels
bug
Something isn't working
$env
Bugs related to the `$env` family of modules
low hanging fruit
ready to implement
please submit PRs for these issues!
Milestone
Describe the bug
Values from
env
from$env/dynamic/public
should be available inhooks.client.js
after build just like in other client-side code, butenv
is empty{}
.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-yf9uq9?file=src/hooks.server.js
npm run build && npm run preview
in stackblitz project terminal;Expected:
Logs
System Info
Severity
annoyance
Additional Information
Workaround is accessing
env
inside root layout script.The text was updated successfully, but these errors were encountered: