-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Module Federation] Failing to determine SWR version #2356
Comments
+1 |
1 similar comment
+1 |
+1 |
+1 |
Any news on this request? thank you! |
We are having this problem as well, this makes SWR essentially unusable with a Webpack Module Federation setup for us. |
+1 |
1 similar comment
+1 |
As a fast fix/unblock:
|
+1 |
Also you can temporary fix it with https://www.npmjs.com/package/patch-package For error:
{
"main": "./dist/index.js",
"module": "./dist/index.esm.js",
"types": "./dist/index.d.ts",
+ "version": "2.2.4",
npx patch-package swr
"scripts": {
+ "postinstall": "patch-package"
} This script will run for every package installation and you can share this patch for your team |
We updated our bundle convention at #2865. |
Could you try v2.2.5? This includes #2356 (comment) |
@koba04 |
I'll close this as fixed. Please reopen this if you still have a problem with v2.2.5 |
Bug report
Description / Observed Behavior
Failing to determine what SWR version to use with Module Federation based on Webpack & SWR 2.0.
Expected Behavior
No warning nor error should be displayed / thrown when using SWR with Module Federation.
Additional Context
Everything was working great with SWR 1.3.0.
Here is the prompted warning:
(Note that the version is already specified in the shared config)
And this is the error thrown:
After manually adding a version to the
node_modules/swr/core/package.json
file, it seems that everything is working as expected but this is not a viable fix.The text was updated successfully, but these errors were encountered: