Commit 05648d0
perf(frontend): stop sharing lucide-react over Module Federation (#2516)
lucide-react was a Module Federation shared singleton in the console remote.
Sharing a package as a singleton forces its whole entry (all ~1700 icon modules,
~1.5 MiB) into the shared chunk regardless of how few icons are used, because the
shared module is the package entry and any consumer might import any icon.
lucide-react is stateless SVG components with no context or hooks, so unlike
react/react-dom/@tanstack/react-query/react-router it has no singleton
requirement. Removing it from `shared` lets this remote tree-shake to only the
icons it imports (184 named import sites, no barrels) and upgrade lucide
independently of the cloud-ui host. When loaded with a host that no longer
provides lucide, this remote uses its own bundled copy (safe for stateless
components). The cloud-ui host and the adp-ui remote unshare it in the cloudv2
repo, so no full lucide copy remains in the embedded scene.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent b1dbe6c commit 05648d0
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
0 commit comments