Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change default browsers to only include browsers that support esmodules #633

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions packages/babel-preset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ const PRESET_ENV_OPTIONS = [
'shippedProposals',
];

const DEFAULT_BROWSERS = [
'ie >= 11',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we definitely don't want any IE support by default?

don't all of our apps set custom browser lists anyway?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apps usually (should) set a default via a browserslist config file, yeah. I think that generally all of our libraries should default to a target that balances minimal compiled output and browser support. Including IE, though makes most of bugfixes useless since there is very little that can be fixed without down-leveling.

I think my position here is that libraries should not exclude ie11 support, e.g. should allow further compiling and polyfilling in the app, like we do for the browser support pages. I don't think a default set of browsers that includes ie11 here tho makes that more likely tho. Overall, new syntax can generally be polyfilled/down-leveled, the real issues are usually around subtle CSS differences or engine quirks, things that you don't uncover unless you are actually testing in IE

'last 2 Edge versions',
'last 4 Chrome versions',
'last 4 Firefox versions',
'last 2 Safari versions',
];
const DEFAULT_BROWSERS = { esmodules: true };

function addDefaultOptions(explicitOptions) {
const options = {
Expand Down