3 ms·
I can remove babel in my code?
by joshxyz 6y ago
I can remove babel in my code?
- fiddlerwoaroof 6y agoIt depends on your target platform: ES6 modules are basically supported in every browser I care about, so the major reason for Babel is JSX
- inbx0 6y agoEven if your target platform didn't have ES6 modules, Babel is probably not the tool you'd want to transpile those with. Let the bundler (which is the topic of the discussion here so I assume a bundler is used) handle them. Tree shaking works better that way anyway. Also if JSX or similar JS extensions are the only thing you need tramspiling for, you might want to look at Sucrase [1] as a fast alternative to Babel. https://github.com/alangpierce/sucrase https://github.com/alangpierce/sucrase