There are a lot of information either on Nuxt SSR, or going full static, but I can't find any guide how to build a hybrid SSR with static pages together.
I'm building a website with Nuxt SSR, and I want to pre-render all product pages statically from a 10MB JSON file.
I found an archived thread on Reddit, mentioned it's possible to create a middleware with the routes to be statically generated. I don't know how to achieve that, and hope I can get some help.
You will probably need to join the Nuxt Discord but this is how you could achieve it: first note that this is not an official way of doing things and we'll have something better coming out very soon. but if you really need this a workaround is as follows:
target: 'server'
(not static)nuxt build
to create your ssr bundlenuxt generate --no-build
(ideally set your routes via generate.routes in your nuxt config)nuxt start
Source: https://discord.com/channels/473401852243869706/473406004751499275/886642260677124166
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments