Skip to content
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

Unknown mark error with Module Federation SSR #210

Open
eon-lee96 opened this issue Jan 11, 2021 · 0 comments
Open

Unknown mark error with Module Federation SSR #210

eon-lee96 opened this issue Jan 11, 2021 · 0 comments

Comments

@eon-lee96
Copy link

Version

Latest

Reproduction link

https://github.com/eon-lee96/my-mf-ssr-example

Steps to reproduce

Just follow the README to run demo

What is actually happening?

For short: nesting import cross two builds

Both Website1 and Website2 have their own imported.js. Website1 consumed a shared component(SomeComponent) from Website2 by using dynamic import. And SomeComponent also import an async component.

In server side, it work as expected----created all marks.

In client side, it cause Error: react-imported-component: unknown mark.
I think this is because the marks on the server side created are inconsistent with the LOADABLE_MARKS in the client bundle.

After calling rehydrateMarks, the LOADABLE_MARKS may be correct, depends on the level of nesting

I have tried my best to solve it (master...eon-lee96:master). It works fine in demo, But i am not sure if this is the best solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant