react-hot-loader: IE11 is throwing errors
Description
IE11 is throwing error regarding usage of Object.assign without it being polyfilled.
Expected behavior
IE11 doesn’t throw any error in console.
Actual behavior
IE11 throws any error in console.
Environment
React Hot Loader version: 4.8.3
Run these commands in the project folder and fill in their results:
npm@6.9.0node@11.12.0- MAC OS X 10.14.4
- IE11 on Windows 8.1
This should be fairly easy to reproduce for everyone. I used VirtualBox.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24
Commits related to this issue
- fix: remove Object.assign, fixes #1226 — committed to gaearon/react-hot-loader by theKashey 5 years ago
- fix: update root endpoint, fixes #1226, #1240 — committed to gaearon/react-hot-loader by theKashey 5 years ago
So it’s broken again then. Some polyfills, like Promises or Object.assign, are commonly expected to be present 😦
Having the same issue @suhanw was showing.
Any news on this? Cannot run o IE11.
I’m on 4.13.0, and it appears Promise is still undefined, it’s throwing the error here: https://github.com/gaearon/react-hot-loader/blob/69b9d483ab3b5af3db8466bbdb124591d6670b81/src/global/generation.js#L59
Is this fixed? I am still getting Object.assign in 4.12.11 and 4.8.6 gives me Promise in undefined 😦
v4.8.6 would fix it
After some digging, I found that the new IE11
SyntaxErroris caused by a trailing commas in the Error constructor argument list.This fails in IE11
but this works:
When I fix it locally, though, I get another error that
Promise is undefinedwhich originates here https://github.com/gaearon/react-hot-loader/blob/master/src/global/generation.js#L47Fair issue. As long as there were just one valid reason to use Object.assign - easy to fix.