preactjs / preact-cli

😺 Your next Preact PWA starts in 30 seconds.
MIT License
4.68k stars 376 forks source link

Update default browserslist #753

Open stramel opened 5 years ago

stramel commented 5 years ago

Do you want to request a feature or report a bug? I'm proposing that we update the default browserslist to be something a bit more modern.

What is the current behaviour?

Builds for IE9 (["> 1%", "last 2 versions", "IE >= 9"]) Here is a list of browsers https://browserl.ist/?q=%3E1%25%2C+last+2+versions%2C+IE+%3E%3D+9

If the current behaviour is a bug, please provide the steps to reproduce.

What is the expected behaviour?

At the very MOST I would expect to build down to IE 11. Ideally we would ignore IE11 by default allowing people to opt-in for IE support if they choose to.

This is what CRA is using https://browserl.ist/?q=%3E0.2%25%2C+not+dead%2C+not+ie+%3C%3D+11%2C+not+op_mini+all

If this is a feature request, what is motivation or use case for changing the behaviour?

Please mention other relevant information.

stramel commented 5 years ago

@prateekbh would this and #752 be a good candidate for v3.0?

prateekbh commented 5 years ago

Both of these SGTM.

However, should modern browsers are now be served by ESM anyways so This should only affect older browsers right?

kristoferbaxter commented 5 years ago

Not sure I agree. The module build should handle this, and the nomodule build is for compatibility.

prateekbh commented 5 years ago

Right, but wouldn't it make sense to not keep the nomodule build too outdated? We can update browserslist config and make it better for nomodule users as well like IE users. Like do we really want to ship support for IE9? WDYT?

lukeed commented 5 years ago

We should cover as broad range we can by default. Those who want to customize & fine-tune their output for more modern browsers can certainly do so, but they should raise their own support floor, not everyone's.

But, for example, the CRA settings drop IE11 which has more (reported) usage than all Edge versions combined and as much (reported) usage as all iOS Safari versions between 8 and 11.4

stramel commented 5 years ago

I believe we are all in agreement with including #752?

Is there anyone opposed to dropping IE 9 and 10 support?

Which leaves IE11 as the more controversial topic...

Is it possible to only add IE11 support on the nomodule version?

ForsakenHarmony commented 5 years ago

I'd be fine with dropping ie 9 and 10