|
|
|
|
|
by haywirez
1745 days ago
|
|
Had several requests lately for the exact opposite pattern — migrating bloated Next.js projects to vanilla React SPAs. Razzle[0] seems like a workable alternative if you need static exports for optimizations such as link unfurling. Still looking for something that isn't based on Webpack (ideally esbuild or swc)— would appreciate links in replies. [0] https://razzlejs.org/docs/static-export |
|
Razzle is a far more hands-off approach, one of those tools that get out of your way, and disappears when you're using it. That has great value because it doesn't dictate how you write your application.
In contrast, Next.js is a framework, with its own universe of conventions, conveniences, ways to do things. It has a lot more functionality out of the box. Excellently documented, too.
I'd say Next.js provides great value in a team environment, to have a common, consistent and simple build configuration as well as application structure.
There's much to love about Next.js, but the only thing that bugs me is how they do opt-out telemetry. I have a postinstall script that runs "npx next telemetry disable", but it feels dirty.
---
As for "bloated Next.js projects", surely that's not the fault of the framework. It does its best to produce a lean production build, so the bloat is up to the user. (Unless you mean the size of the node_modules folder during development.)