Open MadaraUchiha-314 opened 11 months ago
This is a key blocker for supporting nested dependencies from being federated. For eg. if the dependency tree looks something like this:
<root>
- react
- random_package (which only has CJS or UMD output)
- react
Because the commonjs plugin transforms the actual module to something else which contains the exports
statement, the rollup federation plugin is not able to parse it.
react-dom
has a dependency onreact
. Sincereact
is shared, we need to rewrite theimport
to a__federatedImport__
expression.Since v1.2.0 this is what is currently being generated.
This is mostly due to the intermediate files that are created by the
commonjs
plugin which rewrites the content ofreact
package and rewrites the import ofreact
inreact-dom
.