-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
fix(v2): Resolve IE11 compatibility issues (Fixes #1784) #1808
Conversation
Deploy preview for docusaurus-2 failed. Built with commit 67e7105 https://app.netlify.com/sites/docusaurus-2/deploys/5d975d082f62940008b743b9 |
Deploy preview for docusaurus-preview ready! Built with commit 67e7105 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's overkill to polyfill whole corejs.
Why not just polyfill object.assign ?
https://github.com/sindresorhus/object-assign is a good solution.
WDYT ?
I will try that, although I found other issues when only importing that specific method from core-js. I'll let you know asap |
ie11 polyfill from cra https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/ie11.js naturally it will be best if we can utilize it like babel preset env browserslist integration because importing "core-js" loads polyfills for every possible ECMAScript feature: what if you know that you only need some of them? |
Currently our babel-preset-env use the default options
Maybe can utilize https://babeljs.io/docs/en/babel-preset-env#usebuiltins 'usage' |
ef3d377
to
67e7105
Compare
I added the |
the error is not related to #1782 maybe usebuiltins option doesnt work. |
I can confirm the addition of the |
polyfill features that are missing to ie11 only without importing whole corejs ? |
Motivation
I need to create a site that is compatible with IE11 and I like the simplicity of this project.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
I just ran
yarn test
and had the same result thanv2.0.0-alpha.25
(I think because of Windows paths)This is a screenshot of the website in IE11 (not perfect, but ok)
Related PRs
None
Disclaimer: I am no web developer :) so all reviews are welcome. Thanks!