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

How to register Angular lazy loaded modules #23

Open
Harry-027 opened this issue Oct 28, 2019 · 2 comments
Open

How to register Angular lazy loaded modules #23

Harry-027 opened this issue Oct 28, 2019 · 2 comments

Comments

@Harry-027
Copy link

When using registerApplication method from single-spa, where are we informing it about the lazy loaded bundle (for Angular app). Let's say I have a different repo for angular micro frontend. Prod build gives me 2 bundles - main.js & lazy.js, While registering app in shell app I'm referencing main.js bundle. What will happen to lazy.js. How would single-spa come to know about other bundle which has to be lazily loaded ?

@joeldenning
Copy link
Owner

Hmm I am not sure what lazy.js is. Are you using angular 8? Or this repo with angular 2?

You might want to check out the single-spa angular-cli plugin and coexisting-angular-microfrontends repo which configure the webpack config correctly for Angular 8.

@Harry-027
Copy link
Author

I'm using Angular6 & following required steps for using single-spa. Lazy.js is a separate bundle generated for a lazy module when bundled using single spa builder. I'm not sure how to let shell app know about this bundle when registering the micro app.

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