DEV Community

Cover image for I replaced Next.js for my application with this module 🔥

I replaced Next.js for my application with this module 🔥

Anthony Max on May 25, 2025

TL;DR Yes, I understand that you will immediately have doubts about what I am saying, because "How can you change what Spotify, OpenAI a...
Collapse
 
best_codes profile image
Best Codes

You do realize that this is deceptive, right?

Image description

The folder size on your device might be smaller, but you still have to load resources from the URLs when the page loads.

Plus, the actual output of a Next.js build is much smaller than the size of the folder. Dependencies are tree-shook, compiled, minified, etc.

Collapse
 
data_with_drake profile image
Data with Johnson

Peak find 🔍

Collapse
 
anthonymax profile image
Anthony Max • Edited

Hello! The fact that the script's are connected like this does not give anything. I am not going to lie about this - it is pointless. If I had installed them it would have been not 3.6mb, but 3.7mb - it would not have changed anything. As for the Next.js assembly, I do not argue, it is not 300 mb, but it also weighs normally. Imagine, one normal application has about several thousand modules, to make a normal site - this is literally gigabytes of disk space.

Collapse
 
anthonymax profile image
Anthony Max

Thank you very much for your comment! I changed the code and loaded the modules. It turned out to be 4.4mb instead of 3.6mb, so that there would be no feeling that I was misleading. This topic has been discussed for a long time on Alpine.js and HTMX, you can take their examples. There is no point in repeating myself. This is only a possible alternative in some tasks.

Collapse
 
nevodavid profile image
Nevo David

Wow, been thinking about framework bloat myself - you actually switched it up and got a lean setup, respect.

Collapse
 
anthonymax profile image
Anthony Max

Thank you! Yes, modules bloat the project a lot.

Collapse
 
ekalkutin profile image
Evgenii Kalkutin

Are you a a bot? I see you commenting on every post LOL

Collapse
 
dotallio profile image
Dotallio

Love seeing someone actually ditch the usual framework bloat and prove it works - makes me rethink SSR vs CSR for my smaller projects. Curious, what limitations did you hit with HMPL compared to Next.js in a real-world scenario?

Collapse
 
meandre profile image
Andrew

If it worked in 2010 why shouldn't it work in 2025? What's to prove here?

Collapse
 
anthonymax profile image
Anthony Max

Serious projects like Spotify will be very difficult to build, but simple landings and modules for real projects are quite possible. That's the difficulty.

Collapse
 
rkoots profile image
Rajkumar V • Edited

Great breakdown of the early experience with Next.js—especially the realistic look at how quickly project size can escalate even before significant development begins.
[ I appreciate the honesty around installation weight and the practical insight into what happens when you start adding state managers like RTK Query or building more components. It’s something many devs overlook until the project starts ballooning.

Refer Style Guide - Click here ](rkoots.github.io/styleguide/)

Collapse
 
ankit_rattan profile image
Ankit Rattan

Well! This is interesting.

Collapse
 
anthonymax profile image
Anthony Max

I think so too :)

Collapse
 
ankit_rattan profile image
Ankit Rattan

I recently moved to NextJS (fully) and just posted nextjs pros over reactjs. And just after I got yours this post. Another minor shift to use this new module ig 😄.

Collapse
 
david_bussell14 profile image
David Bussell

Good article! Web components are also said to be good

Collapse
 
anthonymax profile image
Anthony Max

Thank you! Yea.

Collapse
 
xemcee12 profile image
Anonymous

Nice!

Collapse
 
lucasbrdt268 profile image
lucas-brdt268

Good discussion! Thank you for your effort.

Collapse
 
nadeem_zia_257af7e986ffc6 profile image
nadeem zia

excellent work

Collapse
 
anthonymax profile image
Anthony Max

Thanks!

Collapse
 
nadeem_zia_257af7e986ffc6 profile image
nadeem zia

Good information provided

Collapse
 
anthonymax profile image
Anthony Max

In fact, the result is quite surprising to me for small applications.

Collapse
 
lucasbrdt268 profile image
lucas-brdt268

Good discussion! Thank you for your effort.