-
Bug
-
Resolution: Duplicate
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
Description of problem:
Loading a theme from a dynamic plugin appears to apply the colors properly for the most part, however it appears that the v5 classes that are created by the v5 version of the theme do not appear to be added to the app or applied to components. With some investigation it appears the emotion styles in the head element of the document where these classes should be getting filled in are completely empty, this is unexpected as the UnifiedThemeProvider initializes both v4 and v5, where material v4 classes are handed by jss-react and appear to be added to the document properly, and v5 which uses emotion, these classes which are derived from the theme do not appear to be getting added to the document head.
This actually seems to be the case even with the out of box themes, but definitely happens with a theme loaded from a dynamic plugin.
One interesting point to consider -> https://docs.tss-react.dev/troubleshoot-migration-to-muiv5-with-tss
But the other observation is that front-end bundles each appear to have their own copy of the various style related packages at runtime, where perhaps the emotion package that contains the cache and cache provider needs to be a shared module in the webpack federated module config.
- duplicates
-
RHIDP-3471 Theme issues with plugins using material 5
- Closed