Skip to content
Discussion options

You must be logged in to vote

This is expected behaviour.

adapter-static prerenders your pages at build time, so your server functions are only run during build time, and not anymore after that. Hence, your cookie is never read after build.

With prerendered pages, the only dynamic values are those set in the browser such as during onMount.

You may want to read the cookie value in the browser (if it isn't http only), or not use adapter-static

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mrbeyond
Comment options

@eltigerchino
Comment options

@Mrbeyond
Comment options

Answer selected by Mrbeyond
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants