You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IE 11 is the only browser we target that doesn't support the ES2015 that we currently compile to ES5:
Via babel-preset-env. According to MDN, Edge does support basic destructuring, just not 'rest' for arrays/objects.
I propose that we:
Modernize our main bundle (dist/mapbox-gl.js, https://api.tiles.mapbox.com/mapbox-gl-js/VERSION/mapbox-gl.js) to un-transpiled ES2015 code.
Continue to support IE 11 by distributing a separate compatibility bundle as dist/mapbox-gl.ie11.js / https://api.tiles.mapbox.com/mapbox-gl-js/VERSION/mapbox-gl.ie11.js.
There are benefits to a modernized bundle for users who don't need IE 11 support:
It'll be a bit smaller -- not tons, but with a 500K+ bundle, every bit counts.
If it's not already faster, I think it will be soon: it seems pretty likely that JS engines will start including optimizations that are specific to ES2015 constructs that wouldn't apply to their ES5-compiled counterparts.
(We could also do this the other way: keep dist/mapbox-gl.js as-is, but start destributing dist/mapbox-gl.es2015.js or something)
The text was updated successfully, but these errors were encountered:
While I like the idea, I think it makes more sense to be opt in (es2015 build) for the time being rather than opt out (ie11 build). I still see a fair amount of users on IE11 or on outdated Chrome/Firefox builds.
it seems pretty likely that JS engines will start including optimizations that are specific to ES2015 constructs that wouldn't apply to their ES5-compiled counterparts.
IE 11 is the only browser we target that doesn't support the ES2015 that we currently compile to ES5:
Via babel-preset-env. According to MDN, Edge does support basic destructuring, just not 'rest' for arrays/objects.
I propose that we:
dist/mapbox-gl.js
,https://api.tiles.mapbox.com/mapbox-gl-js/VERSION/mapbox-gl.js
) to un-transpiled ES2015 code.dist/mapbox-gl.ie11.js
/https://api.tiles.mapbox.com/mapbox-gl-js/VERSION/mapbox-gl.ie11.js
.There are benefits to a modernized bundle for users who don't need IE 11 support:
(We could also do this the other way: keep
dist/mapbox-gl.js
as-is, but start destributingdist/mapbox-gl.es2015.js
or something)The text was updated successfully, but these errors were encountered: