-
-
Notifications
You must be signed in to change notification settings - Fork 903
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
Breaking change happened on v8.3.0 (IE 11 support lost) #551
Comments
@jasonwilliams thank you for reporting. IE11 is still officially supported. It sounds like you might be running into the same issue as #516 ? It looks like your bundler is picking up the Node.js build instead of the browser build. Let me know if the suggestions in the other issue work for you as well. |
my mainfields is set to |
Well, this explains what you're seeing at least, webpack is picking up the Node.js build: #516 (comment) I believe |
That was intentional due to an unrelated issue to this. We had some issues with a package in their "esm" build but their "cjs" build was fine so we needed to force webpack to prefer that version. As long as "browser" is first why would those two being swapped matter? |
In the
So in the specific scenario where you define If you swap the order, then webpack will pick the Node.js ESModule build and subsequently find the corresponding browser-specific overrides and use the Browser-specific ESModule build instead. So the use case where you instruct webpack to use CommonJS builds instead of ESModule builds is one which we currently do not support. BTW once you upgrade to We could "fix" this by providing a CommonJS Browser build. We have deliberately not done this so far because it would further increase the package size while we are not convinced about any clear benefit this would add. |
For now i've locked to an older version until I can update Webpack to v5. Something like that may be worth adding to the documentation, as im sure for various reasons others may have switched the ordering. |
How about adding an additional "browser": {
"./dist/md5.js": "./dist/md5-browser.js",
"./dist/rng.js": "./dist/rng-browser.js",
"./dist/sha1.js": "./dist/sha1-browser.js",
+ "./dist/stringify.js": "./dist/stringify-browser.js",
"./dist/esm-node/index.js": "./dist/esm-browser/index.js"
}, FYI, the cause was IE11 does not support default parameters: - function stringify(arr, offset = 0) {
+ function stringify(arr, offset) {
+ if (typeof offset === 'undefined') {
+ offset = 0;
+ }
// Note: Be careful editing this code! It's been tuned for performance For people who are blocked on IE11, if you are using Webpack 4 and has access to
|
Closing this for now as:
|
This package claims to support IE 11 on the readme. But that stopped working on a minor release.
From what I can gather, v8.3.0 introduced
stringify.js
which utilises default parameters. IE 11 does not support default parameters and thus fails.I've managed to fix this issue by using babel, but its worth:
Related to:
#469
The text was updated successfully, but these errors were encountered: