4 ms·
Yep and with Babel we recommend using https://github.com/babel/babel-preset-env https://github.com/babel/babel-preset-env to compile only what's missing in the
by hzoo 10y ago
Yep and with Babel we recommend using https://github.com/babel/babel-preset-env https://github.com/babel/babel-preset-env to compile only what's missing in the targets you support.
Hopefully we have a better solution about making multiple bundles (separate one for IE) soon
- emn13 10y agoI'm currently experimenting with if-no-window.Promise-then-polyfill via polyfill.io (I dont quite trust synchronous dynamic script loading yet, but we'll see if that's robust enough on old browsers). Sure, old browsers need an extra roundtrip, and it's an additional point of failure - but it simplifies dev tooling, and if your users actually cared about perf, they wouldn't be using ancient browsers. It won't fix many issues (e.g. CSS), but at least some, and without making your build complicated, and without performance sacrifices for the majority of devices.
- pjmlp 10y ago> if your users actually cared about perf, they wouldn't be using ancient browsers. Many of them do care, but not the IT department that vets their machines.
- emn13 10y agoThere are pros and cons there. The overhead isn't huge; if you use any ads whatsoever those likely swamp this effect anyhow. And dev time is limited - how much time is it worth shaving at best 100ms off for a small and shrinking group of clients? It's cacheable, so it's a not a commonly recurring delay, and it's likely to be a lot smaller on decent networks. (https://tools.keycdn.com/ping https://tools.keycdn.com/ping puts the worst ping as being from tokyo at 84ms; many are sub-ms as you might expect from a cdn). I think it's (potentially) a better tradeoff than making most clients pay for larger bundle sizes even though they don't need it. But well: tradeoffs.