-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Investigate IE 11 crash #14946
Conversation
466cd85
to
392f6b3
Compare
392f6b3
to
f3cb65b
Compare
// Use the same helper as Babel to avoid bundle bloat. | ||
import 'core-js/modules/es6.array.find-index'; | ||
import 'core-js/modules/es6.map'; | ||
import 'core-js/modules/es6.set'; |
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.
This should've been there in the first place: https://reactjs.org/docs/javascript-environment-requirements.html
const entry = async () => { | ||
const entries = await originalEntry(); | ||
|
||
if (entries['main.js'] && !entries['main.js'].includes('./pages/polyfills.js')) { |
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.
Details of bundle changes.Comparing: 10438a1...9ebd2a2
|
@@ -1,7 +1,3 @@ | |||
// Use the same helper as Babel to avoid bundle bloat. | |||
import 'core-js/modules/es6.array.find-index'; | |||
import 'core-js/modules/es6.set'; |
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.
This created a different environment depending on the bundle. You can verify this by adding a Symbol
polyfill. React elements will have sometimes types that are numbers, sometimes Symbols depending on the time and place they were created.
I have looked deeper into the problem. I believe that we just have to wait for the release of cssinjs/jss#1065. I have found the following reproduction: import 'docs/src/modules/components/bootstrap';
// --- Post bootstrap -----
import React from 'react';
import { makeStyles } from '@material-ui/styles';
const useStyles = makeStyles({
root: {
flex: '1 0 100%',
},
});
const B = () => {
useStyles();
return <div>wtf</div>;
};
export default () => <B />; ✳ OK import 'docs/src/modules/components/bootstrap';
// --- Post bootstrap -----
import React from 'react';
import { makeStyles } from '@material-ui/styles';
const useStyles = makeStyles({
root: {
// flex: '1 0 100%',
},
});
const B = () => {
useStyles();
return <div>wtf</div>;
};
export default () => <B />; |
Have you tried building this branch locally or any other idea why netlify is failing? I guess we should at least add the Map/Set polyfills. I just recently encountered an issue with the codesandbox-client. IE11 essentially has a non-spec compliant implementation where I remember that we also had some issues where we had to remove |
@eps1lon I haven't tried this pull request. My workflow was: remove all the pages from /pages at the exception of index.js (to get a fast test iteration cycle, ~1min). Do a dichotomy to find the source of the problem. The minimal changes required to make the page work was: 1. mount a simple div, 2. remove the style rules body. |
Using the IE 11 debugger is tricky. I had to pause on all the exception. There are quite a few exceptions thrown by feature detection logic that should be ignored. The first meaninfuly error reported is the JSS startWith issue. |
I feel you. I wish we could disable But your debug approach was a bit different. While jss might be a issue it was not the original issue. The major version upgrade of Does the full site work with all |
Do you want to keep pushing in this pull request's direction? Upgrading JSS fixes the IE 11 crash of the documentation: #15034. |
We can close. I'll keep an eye on the polyfill issue that's not working in netlify. The broken |
Yes, it has already caused trouble in the past, at least for me in Apollo core with IE 11. |
Investigating #14774
git bisect good ba4332d00a5f951cfc33dcffa5924cc7999b8f05 # first bad commit: [440c9f6320d669319b5a3524b2705d73e795e698] [core] Upgrade dependencies and devDependencies (#14493)
440c9f6 regenerated the whole lockfile. Might be just
next
might be some other dependency. Might be a good idea to branch of ba4332d and increment by canaries instead of majors.Already spent a couple of hours on this issue. Working with
next.js
is pretty frustrating so I'll doubt I spend much more time on the issue. Maybe it will fix itself someday.No idea why netlify is crashing. It's working locally.