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
How to use static adapter with example in locale-router-advanced? What I need is to have my default locale without prefix, but files should be built statically. Static adapter works with locale-router-static, but every language has prefix there and the index.html only has JS redirection to default locale.
In svelte.config.js I have this:
const config = {
kit: {
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: undefined,
precompress: false,
strict: true
}),
prerender: {
// This works when all locales are prefixed
// entries: ['/'].concat(supportedLocales.reduce((acc, locale) => [...acc, `/${locale}`], ['*']))
entries: ['*', '/', '/en'] // throws error below (hr default locale, en secondary locale)
// entries: ['*', '/en'] // generates only files for english locale, and nothing for default
}
},
preprocess: vitePreprocess(),
compilerOptions: {
customElement: true
}
};
To make it work with static adapter, check out locale-router-static example and set lang param as optional (double square brackets). Then the default locale will be created both in root and language folder. And on server you can use rewrite rules to redirect default locale folder to root.
How to use static adapter with example in locale-router-advanced? What I need is to have my default locale without prefix, but files should be built statically. Static adapter works with locale-router-static, but every language has prefix there and the index.html only has JS redirection to default locale.
In svelte.config.js I have this:
All I get is this useless error:
The text was updated successfully, but these errors were encountered: