4 ms·
Yes, if you only write JS for Chrome and Node, not sure how many JS devs fall into that bracket!
by nilliams 11y ago
Yes, if you only write JS for Chrome and Node, not sure how many JS devs fall into that bracket!
- nostrademons 11y agoYou also have the option of doing split JS bundles, using different Babel presets, for different browsers. Eg. for Chrome the only thing you need is module imports, but for Safari you use a preset that also includes destructuring, function defaults, etc. This reduces the attack surface that a rogue Babel dependency has access to - instead of being able to pwn your server and all browsers, it can only pwn the browsers that use the particular transform that depends on it. It also can result in significant byte-size savings in the downloaded bundle.
- deleted 11y ago[deleted]