4 ms·
Unfortunately as long as any of your target browsers don't support all of the transpiled features, you need to transpile for everyone. Unless you start serving
by netghost 11y ago
Unfortunately as long as any of your target browsers don't support all of the transpiled features, you need to transpile for everyone.
Unless you start serving up different builds based on user agent...
- brokentone 11y agoNot necessarily. You could build multiple targets and dynamically serve one over the other. Not as hard as it sounds.
- frandroid 11y agoIsn't that what the parent said?
- brokentone 11y agoDidn't when I posted it
- Kiro 11y agoWhat tools do you use to make it happen?
- brokentone 11y agoStill working it through. The steps as I see it: Figure out which browsers to support on which features: https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/ Have an alternate .babelrc with a transpile blacklist that points to a separate dest Build a regex to match those browsers in your CDN (I use Fastly). Vary on the value you create. Point said browsers asking for the normal JS payload to the alternate dest.