Jelmer
Big performance regressions happing after adding large amount of redirects (3000+) inside routeRules
Hi! Is anyone here maybe familiar with big performance regressions happing, after adding a very large amount of routeRules entries (3000+ redirects) to nuxt.config.ts ? I see this happening in my project. I am trying to see why it is happing. Every Nuxt page has about a ~10x decrease in initial HTML response time after adding the redirects. As a test, a blank Nitro application configured with the same routeRules does not show this performance regression. Has anyone experienced this?
5 replies
Nitro server plugin to cache Nuxt images: how to respond with a file from disk?
Hi, I am writing a server plugin like below. I am using the @nuxt/image module with the ipx provider. I would like it to save its generated image files to disk, and serve those files whenever the exact same file is requested.
This example below works. I get served files from disk. But I am using a
new Response
and doing event.respondWith(res);
which keeps resulting in this error in the CLI:
My knowledge of Nitro is limited; if I were to create a plugin like this, is this the correct way? How can I respond with the image file inside the request
hook without getting [500] Cannot set headers after they are sent to the client
? Should I use another method to create this functionality? Help is greatly appreciated 🙂
3 replies
How to do Static Site Generation with no JS on the client side in Nuxt 3
Hi there! I would like to know if it's possible to use
nuxt generate
to create a static html version of my app, without any JS on the client side. Right now when I generate the app it will include JS to (I think) hydrate the client side JS over the generated html. I would like to generate just HTML and CSS. My content will be fetched from an API. So considering this nuxt example page:
I would like to generate this static HTML version:
Is this possible?9 replies