I'm using Webpack + Babel... but literally only for features after async/await. All major, current browsers support it. That's the baseline support for the apps I'm working on now.
The payload to fill promises, regenerator and async are huge, and without them, my payload is significantly smaller. for preset-env...
{
loose: true,
modules: false,
useBuiltIns: 'usage',
corejs: 3,
targets: {
browsers: ['edge 15', 'safari 10.1', 'chrome 58', 'firefox 52', 'ios 10.3'],
},
exclude: ['transform-async-to-generator', 'transform-regenerator'],
},
from here, I only need the features not part of stage 4 that I want to add. I have the following in a test script...
try {
eval('(function() { async _ => _; })();');
if (typeof fetch === 'undefined') throw new Error('no fetch');
} catch (e) {
window.location.replace('/auth/legacy.html');
}
With async functions, and fetch api available, you get a
LOT in the box.