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
allow disabling client-side JS entirely #14765
Comments
Pure HTML is not a normal output mode. We were considering it with @Atinux since Nuxt 2 but finally decided to not introduce but i really love this idea specially combined with reactive component islands. We can probably have a module to try this mode ahead of time. Later can be joined with route rules to set per page (or group of pages) bases. Also good point about detection! What about a magical |
This is great, just like building islands, non-interactive and interactive loading of js scripts. This will improve very high performance and resource size. |
It'd be great to see it in the core with some sort of support for island hydration |
Yes, this is the beginning of a revolution |
This would be the key feature for us not to switch to Astro |
I have written post-build hacks to do this in nuxt 2 and it is a real pain point. Kudos @danielroe |
Support nuxt2? |
You can do this in Nuxt 2 by setting |
The feature looks great, it would be amazing to use it per route! |
Having absolutely no JS is not useful; we need some JS in header or in button to toggle dark mode. It would be better to have this feature per component, like in Astro. By default, global setting will render no JS, but with JS option set in particular component, Nuxt could enable JS for only those components. |
For some use cases, users may wish to have a purely HTML + CSS website where interactivity is not required. Shipping JS to hydrate such a site is unneeded.
For these use cases, we could consider support a top level option (or a per-path route rule) to disable rendering JS preload hints + script tags within the renderer.
Some initial steps:
Note: We may also need to update https://github.com/nuxtlabs/vue-telescope-api to accurately detect Nuxt on such sites. At the moment, it is unaware that https://nuxt.new/ is built with Nuxt 😆
The text was updated successfully, but these errors were encountered: