-
Notifications
You must be signed in to change notification settings - Fork 244
Description
For which library do you need help?
native-federation
Question
Setup:
- Native Federation:
^20.1.7 - Angular:
^20.3.0 - Node:
22.20.0 - Browser: Edge (latest)
I have a remote application. After adding the Native Federation configuration, I tried running it independently using ng serve to confirm everything works before integrating it with the host. I encountered multiple errors. Since they all appear related, I’m grouping them here; however, please let me know if you prefer separate issues for better tracking.
(This is my first time creating an issue!)
I’m currently facing problems with four imports (so far—this is a large codebase, so more may surface once these are resolved):
Problem Imports
import localeInExtra from '@angular/common/locales/extra/en-IN';import { map } from 'rxjs/internal/operators/map';import * as Charts from 'fusioncharts/fusioncharts.charts';import { AlignStyle } from 'quill/formats/align';
✔️ What I Managed to Fix (1 & 2)
1. Angular Locales – Nested Path
I resolved this by explicitly adding the nested path to the shared config:
'@angular/common/locales/extra/en-IN': {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},This fixed the error.
However, a similar import works fine without any special handling:
import localeIn from '@angular/common/locales/en-IN';I don’t understand why the first one fails while this one doesn’t. Any explanation would be appreciated.
2. RxJS Internal Import
I attempted a similar approach—adding the nested import to shared—but it didn’t work.
Instead, I switched from:
import { map } from 'rxjs/internal/operators/map';to:
import { map } from 'rxjs';This was based on discussions in issues #430 and #526.
Even though the package's exports section defines secondary entry points, they seem to be ignored.
Since our codebase has ~6000 files, I’m worried we’ll run into many similar imports and will have to refactor all of them. That doesn't feel right, so I may be missing something. Any guidance here would help a lot.
❌ Issues I Could NOT Resolve (3 & 4)
3. FusionCharts – Dotted Import Paths
According to issue #973, dotted import paths (e.g., fusioncharts.charts) should be avoided due to a Vite-related limitation.
However, FusionCharts officially documents this syntax:
import * as Charts from 'fusioncharts/fusioncharts.charts';Renaming the package or restructuring it isn’t feasible for us (it’s an external dependency, and reinstalling would undo any local changes).
Is there any recommended workaround that doesn’t involve modifying the library?
4. Quill – Missing Secondary Entry Points
For Quill:
import { AlignStyle } from 'quill/formats/align';Quill doesn’t declare secondary entry points at all, so I’m not sure what the correct solution should be here.
Any suggestions or clarification would be extremely helpful.
📌 Next Steps
I’ll create a minimal reproducible repository ASAP and update this issue with the link.
Thanks in advance!