Hacker News new | ask | show | jobs
by techpression 1206 days ago
I think this is actually because esbuild doesn’t support everything needed in their production bundle (well controlled/grouped bundles) while it’s excellent for dev where there’s no such need.

I can’t remember where I read it, I think it’s in the official docs.

2 comments

That's indeed correct [0]. esbuild is still a bundle though, so it wouldn't change much other than (much) faster production builds.

[0]: https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuil...

Fresh is using esbuild to build the bundles at runtime instead of pre-deployment. So it rebuilds the bundles everytime a new process starts up and keeps copies of those files in memory for each process.