-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static site generation #1
Comments
Hi, Mark. Sorry for the late response. I suppose the issue might have been due to 2 reasons:
I updated the repo, cleaned it a little bit, replaced -import adapter from '@sveltejs/adapter-auto';
+import adapter from '@sveltejs/adapter-static';
const config = {
...
kit: {
- adapter: adapter(),
+ adapter: adapter({strict: false}),
alias: {
$actions: 'src/lib/actions',
$components: 'src/lib/components',
$icons: 'src/lib/icons',
$stores: 'src/lib/stores',
$utils: 'src/lib/utils'
},
+ prerender: {
+ // avoid throwing a prerendering error when using adapter-static and inlang dynamic routes
+ handleHttpError: 'warn'
+ }
}
...
}, |
Hi , kit: { |
I think this is not necessary when using the adapter static, since this is the default behaviour (to prerender all pages)
Sorry, my bad. The const config = {
...
kit: {
- adapter: adapter({strict: true}),
+ adapter: adapter({strict: false}),
}
...
} Note: It may not be the best solution, but it's a workaround. Can you try and tell me if it works? Thanks in advance :) |
Hi Again, So any ideas on how to get the home page rendered so the App can be accessed but not break the Lang? |
Have tried using your starter project and adding static site pages.
Using Svelte static site generator
https://kit.svelte.dev/docs/adapter-static
Following the usual steps the site starts fine (npm run dev) but does not build correctly. (npm run build)
At a loss as to why.
Hoping you might have an answer?
Regards
Mark
The text was updated successfully, but these errors were encountered: