Minimal create-next-app produces 100kb first load JS #76800
Replies: 2 comments 2 replies
-
|
I feel like, at some point in the future, this could be supported. I am not speaking for the team, and nothing like that, but the React docs do have this option: Important As far as I know, there's no such option in Next.js at the moment ~~~ !!
This can be seen in both pages... It just requires a bit more of static analysis, or a user land assertion, that, I do not need React, hydration nor Next.js scripts for routing, I know what I am doing, so please don't inject bootstrapScripts. But then again, I am guessing a lot here, I am just going of what's stated in the react.dev docs. |
Beta Was this translation helpful? Give feedback.
-
|
Is there a way to use this option in Nextjs? I'd love to have a "stripReact" or even "stripAllScripts" option that would prevent the inclusion of scripts in the build manifests. These options would allow Nextjs to run in a similar way to Astro by not including default JS in simpler builds. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This produces 4 JS files, desspite there being no utility for them.
Is there a simple option to strip all scripts from the response?
Seems like it would be easy to just not include them in the build because the app works the same without js enabled.
Beta Was this translation helpful? Give feedback.
All reactions