-
Notifications
You must be signed in to change notification settings - Fork 194
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: do not use URLSearchParams to support IE 11 without polyfill #106
Conversation
Some background:
The two above combined will mean even with this change, IE is still imcompatible, unless we do a custom implementation of All that said - I think we can move the |
Thanks for the comment. I looked at the usage of native-url, since we do use webpack-dev-server and the websocket implementation (instead of the default sockjs). It seems that part of the code then works fine on IE 11, at least in our case. All in all, with this change it solved our problems. I'm fine with it being solved another way though! |
@pmmmwh I converted this PR into a draft to indicate it's not ready to be merged. If I understood you correctly, I pushed a few further refactoring commits to move the parsing into a util method that's called internally in If you rather wish to take care of this yourself, let me know! |
Yea, this is how I've envisioned it. I'll think about chunking order issues. I think moving forward maybe we'll have to have logic to make sure the error overlay is injected once only, like how the refresh hook should only be injected once. This can be handled later. |
Hello, I rebased this PR to the new |
I also opted to refactor the |
Thanks for the PR! This will land in the next beta. |
As mentioned in #88 (comment), we kept having issues with the top-level
URLSearchParams
call inErrorOverlayEntry.js
. Because it gets immediately invoked when the webpack chunk containing the code is loaded, it was running before our polyfill bundle and thus breaking IE 11.Since the purpose of the offending code was to parse override options from the webpack
__resourceQuery
, I opened this PR to avoid the call entirely and instead just usingdecoreURIComponent
, andString.prototype.split
.This should allow the plugin to work without polyfills on IE 11.
What do you think?
I'm not sure if the README has to be updated with regards to the polyfilll section.