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

[Feature Request] I want to expose one seperate module or component to main app, how can I implement this? #2804

Open
hanalice opened this issue Nov 11, 2023 · 3 comments

Comments

@hanalice
Copy link

Background

My main app is based on angular, and my sub app is base on angular also. I want to render one component(not the app.component) of sub app in the host app, how can I implement this?

Proposal

I see there has some props named moduleNames and containers cofiguration in registerMicroApps. From my understanding, only if I provide the right module names and containers, qiankun should render the correct module/element in the specified container.
image

Additional context

I have see a issue related with this #1397, it recommends to pass parameters from main app to sub app, and let the sub app to do the handle or display logic, but I think it's too complicated for the sub app intergration, and it violates the main idea of micro frontend. From my understanding, mfe aims at modify the sub app in the least effort, and the dynamical loading and rendering logic should be handled by mfe framework, like qiankun.

@hanalice
Copy link
Author

@kuitos @gongshun any idea about this scenario?

@kuitos
Copy link
Member

kuitos commented Nov 14, 2023

I think what you need is webpack Module Federation.

@hanalice
Copy link
Author

hanalice commented Nov 22, 2023

I think what you need is webpack Module Federation.

so it's not a expected use scenario about qiankun, right?

thanks Kuitos, I would like to look into webpack Module Federation, and currently I turn to Web Component, and it also can work.

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