lib
lib copied to clipboard
locale-router with prerendering fails
Whenever I try to add sveltekit prerendering I get errors like:
node:internal/event_target:1083
process.nextTick(() => { throw err; });
^
Error: The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:
- /[lang]/about
What should the example locale-router should look like, that this would work?
Would also like info on this.
This might also be related to https://github.com/sveltekit-i18n/lib/issues/132
You need a link that points to those pages or add them svelte.config.js like
prerender: {
entries: supportedLocales.reduce((acc, locale) => [...acc, `/${locale}`, `/${locale}/401`, `/${locale}/403`, `/${locale}/404`, `/${locale}/500`], ['*']),
}
Check out the examples.