Skip to content
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

Make the package (widget) leaner #291

Open
VladimirMikulic opened this issue Aug 31, 2024 · 2 comments
Open

Make the package (widget) leaner #291

VladimirMikulic opened this issue Aug 31, 2024 · 2 comments

Comments

@VladimirMikulic
Copy link

For some time now at work our Next.js 14 front-end codebase has been almost unusable. Initial compilation took more than a minute on my i7 CPU, HMR not working requiring full page refresh, changes taking several seconds to even propagate for page to refresh etc, Next.js server running out of memory crashing etc.

For initial compilation we saw message by Next.js "compiling 30487" modules. After we removed LiFi widget (0 other changes), modules number dropped to ~5100. That's right, 25000 modules less, 600% smaller, initial compilation took only 10 seconds, got back HMR and changes take about 500ms to propagate.

I saw you have dependencies on UI libs so I presume they could be causing it and I think such a simple widget (from UI standpoint) could really be simplifed and shouldn't depend on so much stuff. I'm still amazed that a single widget has 6x more modules than our entire app and libs combined.

@chybisov
Copy link
Member

chybisov commented Sep 2, 2024

@VladimirMikulic thank you for the feedback. Such many modules are only processed in the development mode and they are tree-shaken in the production build. We will take measures to improve DX and shrink them out in the development mode as well.

@VladimirMikulic
Copy link
Author

@chybisov appreciate the response. Yes, I was referring to development mode for all of the issues mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants