Skip to content
Discussion options

You must be logged in to vote

From the docs:

Note that you can still prerender pages that load data based on the page's parameters, such as a src/routes/blog/[slug]/+page.svelte route.

Accessing url.searchParams during prerendering is forbidden. If you need to use it, ensure you are only doing so in the browser (for example in onMount).

https://kit.svelte.dev/docs/page-options#prerender-when-not-to-prerender

As a side note, you only receive the error during build because pre-rendering only occurs during build.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kesdigital
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