4 ms·
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 esbuil
by cocoflunchy 5y ago
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...
- streptomycin 5y agoYou could try running buble on the esbuild output, IIRC it used to be faster than babel.
- slaymaker1907 5y agoYou could just have a special build flag for IE11 support that does the slow path?
- mattsahr 5y agoI'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 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.
- BiteCode_dev 5y agoUse Vite to dev, then setup a separate webpack + babel for testing and build for prod.