News for hackers. Stuff that matters.
Re:Comparing the New Generation of Build Tools by cocoflunchy on Thursday April 22, 2021 @01:33AM (#26899099)
Has anyone found a faster way than Webpack/babel to build a react / typescript SPA that needs to stay compatible with IE11?

I've been experimenting with esbuild but it doesn't support IE11/ES5 and adding babel into the mix makes things slow and complicated again...

Re:Comparing the New Generation of Build Tools by mattsahr on Thursday April 22, 2021 @06:12AM (#26900956)
I've had success running swc on the output of esbuild, with a swc target of IE11. We do this only for the IE11 build. So at app startup, we check for IE11, and then load a polyfill from https://polyfill.io, and then the IE11-specific build.

The goal is to make it to September, when we have decided we can completely pull the plug on IE.

Re:Comparing the New Generation of Build Tools by slaymaker1907 on Thursday April 22, 2021 @03:05AM (#26899686)
You could just have a special build flag for IE11 support that does the slow path?
Re:Comparing the New Generation of Build Tools by BiteCode_dev on Thursday April 22, 2021 @08:04AM (#26901767)
Use Vite to dev, then setup a separate webpack + babel for testing and build for prod.
Re:Comparing the New Generation of Build Tools by streptomycin on Thursday April 22, 2021 @02:02AM (#26899263)
You could try running buble on the esbuild output, IIRC it used to be faster than babel.