Consider using webpack optimize-plugin to reduce KB size ~9% #20270
websocket98765
started this conversation in
Ideas
Replies: 2 comments
-
Next.js already uses the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Based on the page speed test, there're some legacy scripts syntax still used in modern browser, so it's necessary to use optimize-plugin to build the separated scripts.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature request
Consider adding https://github.com/developit/optimize-plugin to NextJS' webpack config.
Why?
Google released a website where you can enter your URL and it will estimate KB savings of using 'modern JS'. For my NextJS app, savings were ~9%.
The recommended improvements can be automatically applied using a webpack plugin: https://github.com/developit/optimize-plugin
I know I can add this manually to my webpack config, but it might be worth considering as a default part of NextJS for best developer experience.
Blog post with more info
https://web.dev/publish-modern-javascript/
Beta Was this translation helpful? Give feedback.
All reactions