Replies: 1 comment
-
Closing as stale. we are now using craco esbuild plugin on all frontends, and migration to nextjs is underway for explorer. |
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
-
Hello team,
I've spent some time to try out if a move from CRA to Vite would make sense for us. My main reasons for moving on from CRA were the following:
I've set up a branch with our repo converted to work with Vite here. The latest commit also tries to add support for Vitest, which was unfortunately much harder than I thought. I have only briefly tested the app itself, but the build and typecheck passes.
The build time went from 36.79s to 18.92s (including tsc, which is very slow), 12.73s without tsc. So an almost 2x improvement in build time.
However, there is another, lower-hanging fruit that we can pick - keeping craco, but swapping out Babel and Terser for esbuild. Branch here. This requires changing only the craco config and installing the package.
With esbuild, the build time is 14.78s, including type-checking, almost a 2.5x improvement in build time, with no code changes necessary. Pretty nice 😎
For now, I would just merge in the esbuild plugin, and scratch the Vite plan.
In the future, I would explore using Next.js, since they are the most well-funded and have the best feature set, and their shipping speed is extraordinary. They are making big advances on the performance front too by moving their compilation pipeline to Rust. But that is a discussion for after we launch the v1 I think, because it would be a larger architectural change.
Beta Was this translation helpful? Give feedback.
All reactions