Hacker News new | ask | show | jobs
by constexpr 1948 days ago
It's strange that they are comparing output size without passing --minify to esbuild. Why compare the size of the debuggable output?

And if you care about output size, you would also need to pass --define:process.env.NODE_ENV=\"production\" to esbuild since the benchmarks include React, and you don't want to bundle both the debug and release versions of React at the same time.

1 comments

Thanks for the tip, will make sure to fix this
I noticed you changed this to "dev" instead of "production". Just letting you know that this will select the development build of React instead of the production build, which is not optimized for size and will lead to a bigger output file.

Good luck with your project!

Yes, this is because Im building it in "dev" for FJB as well. The circumstances should be equal for all benchmarks.
Ah I see, no worries. I assumed you were trying to compare against a production build since that's what "parcel build" does.
Right, I'll have to fix this too