You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NPM page for adapter-static is missing the latest updates to the documentation. I can see at least these parts missing:
// svelte.config.js
import adapter from '@sveltejs/adapter-static';
export default {
kit: {
adapter: adapter({
// default options are shown
pages: 'build',
assets: 'build',
fallback: null,
precompress: false
}),
-- prerender: {- // This can be false if you're using a fallback (i.e. SPA mode)- default: true- }
}
};
And this whole section:
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 option set will be prerendered at build time.
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.
I guess what this comes down to is "which readme updates warrant a changeset so that they then get published in a timely fashion" and I don't have a good answer to that. The npm readme is only updated when the package is published, and it's been a couple of months since then.
If it's a low-velocity package, it seems like any changes should trigger a patch. Otherwise, what's the point of changing the documentation? For higher-velocity ones (like Kit), I could see rolling them into releases.
Describe the bug
The NPM page for
adapter-static
is missing the latest updates to the documentation. I can see at least these parts missing:And this whole section:
Reproduction
Linked to the NPM page above. Compare to the GitHub README.
Logs
System Info
Severity
annoyance
Additional Information
Confusing people in Discord. :(
The text was updated successfully, but these errors were encountered: