DEV Community

Discussion on: Blazing fast TypeScript with Webpack and ESBuild

Collapse
mindplay profile image
Rasmus Schultz

Can you explain why? What's the advantage of this over just running esbuild?

The only reason I can think to do this, is the need for something like Babel to down-level the code for IE11 - but if you add Babel, the build is immediately slow again. And speed seems to be the primary advantage to using esbuild, right?

Who would someone combine webpack and esbuild? What are you getting that esbuild can't give you?

Collapse
karanpratapsingh profile image
Karan Pratap Singh Author

Hi, this is a great question...We can certianly replace the webpack with just esbuild alone, my reason for not doing so was due to the fact webpack's ecosystem has better plugins which was quite important for the project I was working on.

Since this setup is mainly focused for node, so I didn't require babel loader to optimize for browsers...for frontend I use vitejs.dev (also uses esbuild).

But if just esbuild fits your project, you can certainly do it without webpack

Hopefully this answer helps