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

feat: share external dependencies between micro-frontends (rxjs + single-spa) #4

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

kfrederix
Copy link
Owner

This PR enables sharing of external dependencies between micro-frontends.

NOTE:
At this moment, Vite adds /@id/ in front of dependencies that were marked as external. This breaks the import statements during dev mode. Since Angular provides no way to hook into the Vite config, I have added a patch file on the @angular/build package to work around this. My next step will be to open a new issue on the angular-cli repo and submit a PR to (hopefully) integrate a fix upstream.

Related issues on Vite repo:

=> When we have access to the Vite config, it can be solved by using a plugin (https://github.com/MilanKovacic/vite-plugin-externalize-dependencies) but as mentioned before, this is currently not possible with the Angular application builder (and likely never will be)

Somewhat related earlier PR on angular-cli repo: (which acknowledges that the issue is not really fixed...)
angular/angular-cli#26129

Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
single-spa-angular-esm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 2:26pm

@kfrederix kfrederix merged commit 324a646 into main Jul 9, 2024
2 checks passed
@kfrederix kfrederix deleted the shared_dependencies branch July 22, 2024 09:30
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

Successfully merging this pull request may close these issues.

1 participant