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

What if not use "shared" in host app #374

Closed
matthewma7 opened this issue Sep 21, 2020 · 1 comment
Closed

What if not use "shared" in host app #374

matthewma7 opened this issue Sep 21, 2020 · 1 comment

Comments

@matthewma7
Copy link

Thank you for this great invention. It opens up so much possibilities!

For the basic-host-remote example, it looks like I can comment out the whole shared config and I also change to not use bundle-loader or dynamic import, the app button2 still works fine, so what have happen when I did those change? Is this ok thing to do if I don't need omnidirectional host?

@matthewma7 matthewma7 changed the title What if not use shared in host app What if not use "shared" in host app Sep 22, 2020
@ScriptedAlchemy
Copy link
Member

Sure. So you can choose not to share. But in doing to you'll load multiple copies of the same dependency, a major problem for stuff like react. You only need a import bootstrap if you're sharing something in the entrypoint that's not dynamically imported. If you async imported all the shared modules. Or didn't share, webpack won't have async issues because it's shipping it's own vendors and you're not orchestrating shared code between the apps runtimes. If you added a hook to the remote component. It likely would throw a react error since react needs to be a singleton

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

2 participants