-
Notifications
You must be signed in to change notification settings - Fork 31
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
share chart.js
package: error Package subpath './package.json' is not defined by "exports"
#152
Comments
Hi, thanks for your interest in the project. |
This is something wrong in the d3 package, in fact, I found an issue in their repo. |
d3
package: error Package subpath './package.json' is not defined by "exports"
There's not much to say here, we can't do anything because the issue is on d3 package. Thanks. |
@gioboa If some package which has multiple export paths, and it doesn't have package.json in exports like:
then only adding those packages in shared is causing above issue. This I have tried with several dependencies. But the same package with no package.json as export but other export paths is working fine with webpack module federation plugin but not with the vite federation plugin. Not sure what exactly the issue is. This is not just issue with using d3 only but other packages too which has no package.json export but other export paths |
Can you give me one or two examples pls? |
@gioboa for e.g |
Nice, I'll take a look |
any update on this issue? can we reopen this issue as it is not limited to |
You are right. Let's re-open it |
d3
package: error Package subpath './package.json' is not defined by "exports"chart.js
package: error Package subpath './package.json' is not defined by "exports"
Hey, are there any updates on this? |
No one is working on it, as far as I know. Feel free to help us if you like. |
Dirty hack, but can you patch the package.jsons of the affected packages? |
I propose this workaround #216 |
I also have this issue migrating an old Webpack MF project to Vite. More examples |
Hi @irwinarruda |
@gioboa, I’ve left a comment in the PR. |
Closed by #246 |
In the federation plugin when adding a dependency which has multiple exports paths, as shared dependency in remote like this:
getting following error:
Vite version : 5.4.8
Node.js: 20.16.0
The text was updated successfully, but these errors were encountered: