Skip to content

Commit

Permalink
Update packages/adapter-static/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 13, 2022
1 parent 2ac3b77 commit d3f059f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/adapter-static/README.md
Expand Up @@ -71,7 +71,7 @@ export default {

When operating in SPA mode, you can omit `config.kit.prerender.default` (or set it to `false`, its default value), and only pages that have the [`prerender`](https://kit.svelte.dev/docs/page-options#prerender) option set will be prerendered at build time.

If Node.js throws errors when loading your pages during the build process and this is hard for you to work around, setting `config.kit.prerender.entries` to `[]` will prevent the build process from attempting to load any page or layout components. Do not set `config.kit.prerender.enabled` to `false` because that will also prevent the fallback page from being generated.
SvelteKit will still crawl your app's entry points looking for prerenderable pages. If `svelte-kit build` fails because of pages that can't be loaded outside the browser, you can set `config.kit.prerender.entries` to `[]` to prevent this from happening. (Setting `config.kit.prerender.enabled` also has this effect, but would prevent the fallback page from being generated.)

> ⚠️ During development, SvelteKit will still attempt to server-side render your routes. This means accessing things that are only available in the browser (such as the `window` object) will result in errors, even though this would be valid in the output app. To align the behavior of SvelteKit's dev mode with your SPA, you can [call `resolve()` with a parameter of `{ssr: false}` inside the `handle()` hook](https://kit.svelte.dev/docs/hooks#handle).
Expand Down

0 comments on commit d3f059f

Please sign in to comment.