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

Polyfill for browsers (looking at you IE11) #1055

Merged
merged 2 commits into from
Dec 11, 2018
Merged

Conversation

mirka
Copy link
Member

@mirka mirka commented Nov 29, 2018

This changes our browser targets to > 1% and ie >=11 (list of browsers), which will affect autoprefixer and babel transpilation.

It is set up so that only the polyfills necessary for supporting these browsers will be included.

Unfortunately we are going to need to transpile our node_modules as well, as some modules are shipping with ES6 code. I first looked into ways we can automatically pick out only the node modules that require transpilation, but with Babel 7 the speed/safety impact of just babelifying everything seems minimal. This is also how create-react-app is doing it now.

The conversion from .babelrc to babel.config.js is necessary for transpiling node_modules.

Sad trivia: I think these polyfills are adding around 20 to 40kB (gzipped) to our app bundle 🎺

To test

Quickly check that the app runs in IE11. CSS issues will be dealt with in a separate PR. (We should do a thorough test after that.)

@mirka mirka added this to the Web app milestone Nov 29, 2018
@mirka mirka requested a review from roundhill November 29, 2018 17:16
Copy link
Contributor

@roundhill roundhill left a comment

Choose a reason for hiding this comment

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

screen shot 2018-12-10 at 9 32 53 am

🎉

@mirka mirka merged commit 0e2ff2f into master Dec 11, 2018
@roundhill roundhill mentioned this pull request Dec 11, 2018
8 tasks
@mirka mirka deleted the chore/polyfill-for-browsers branch December 26, 2018 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants