Open rubiks-cube opened 1 week ago
Hi, thanks for your interest in the project. Can you create a basic reproduction repository please?
This is something wrong in the d3 package, in fact, I found an issue in their repo. Unfortunately this is an old problem https://github.com/d3/d3/issues/3556
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:
"exports": {
"./package.json": "./package.json",
},
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 chalk
, chart.js
, ramda
Nice, I'll take a look
any update on this issue? can we reopen this issue as it is not limited to d3
? as a workaround for now I also added package.json in export paths for package that I was importing, and we own this package, so it was ok but looking for proper solution. I gave d3 just an example.
You are right. Let's re-open it
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