-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use Nuxt build with crawler #660
base: main
Are you sure you want to change the base?
Conversation
nuxt.config.ts
Outdated
}, | ||
}, | ||
routeRules: { | ||
'/**': { swr: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would want to use static: true
but doesn't work for some reason...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that every route will now be swr rendered? Or just the routes that didn't get prerendered by the crawler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the routes that didn't get prerendered, I actually see the docs have changed in the meantime adding isr:
isr - The behavior is the same as swr except that we are able to add the response to the CDN cache on platforms that support this (currently Netlify or Vercel)
@@ -3,7 +3,7 @@ | |||
"private": true, | |||
"scripts": { | |||
"dev": "nuxt dev", | |||
"build": "nuxt generate", | |||
"build": "nuxt build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add a decision log entry for why we're switching to nuxt build. I've written these reasons to switch down in my notes:
- Blog pagination is difficult with generate
- Build time
- Dynamic routes configuration is hard to maintain
nuxt.config.ts
Outdated
nitro: { | ||
prerender: { | ||
crawlLinks: false | ||
} | ||
crawlLinks: true, | ||
routes: ['/en/', '/nl/'], | ||
}, | ||
}, | ||
routeRules: { | ||
'/**': { swr: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do the routeRules work combined with the prerender options? I think it's good to put in some comments about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think the Nuxt docs should explain this in their docs.
nuxt.config.ts
Outdated
}, | ||
}, | ||
routeRules: { | ||
'/**': { swr: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that every route will now be swr rendered? Or just the routes that didn't get prerendered by the crawler?
3e7bf0b
to
096a032
Compare
Deploying with Cloudflare Pages
|
9b73322
to
2a111ed
Compare
25d5b8c
to
1f995cc
Compare
1f995cc
to
3765acc
Compare
Crawled pages seem to perform just like production on Netlify! Need to test non-crawled pages behaviour. |
fea89c6
to
b95f430
Compare
b95f430
to
09374ea
Compare
State
Netlify
Plausible proxy does not work, returns a http status 401Homepage redirect always redirects to the fallback language/en/
Cloudflare (Pages)
index.html
directly is fast though...Contact form
Use spam protection? Netlify uses https://akismet.com/