I switched my pet project (about 15000 lines of code) from Webpack to esbuild, and reduced the build time from 30 seconds to 2 seconds.
The trickiest part was to make Tailwind CSS work. I used to do that via postcss plugin, but just running that plugin even without Webpack takes 15 seconds. Finally, with some modifications in my CSS I made it work, and purged the unused styles just by using PurgeCSS API manually.
The setup got a bit hairier than with Webpack, but it builds damn fast now.