- We prebundle the entire lib/ui with tsup.
- We tell the manager builder to serve lib/ui/dist as part of staticDirs
- We add the prebundled runtime to the main template as script reference
This works! Webpack builds ONLY the addons, not the manager UI!
But there's a problem... the manager gets react components injected into it.
These react components do not share the same version of react.
That causes the well know: hooks-call problems.
So left to investigate:
- Will this really work? Does bundling lib/ui and everything it needs break nothing?
- How to force a single version of react? (all dependencies normally coming from the manager, really)