Open tzimmermann opened 1 week ago
Hi @tzimmermann
it turns out, that this bug is related to the change from React JSS to CSS modules in v1.28.0. In that version, we tried to optimize the bundle size by only adding the used CSS classes. Unfortunately, this had an unintended effect on MFEs, resulting in the behavior you're describing.
We've fixed this in the v1.29.10 release. However, if you're using a version between 1.28.0 and 1.29.9, the issue still exists, as those versions don’t apply scoping. Therefore, component styles from all applications are removed if a component (like the FlexBox
) is no longer used by an MFE.
To summarize:
Would it work for you to update all MFEs using the affected versions to v1.29.10?
Apologies for the inconvenience!
Describe the bug
When upgrading @ui5/webcomponents-react from 1.29.9 -> 1.29.10 we noticed broken styles. It seems that
FlexBox
component styles (maybe others as well) are removed, which leads to components flowing beneath each other instead of next to each other, breaking the whole layout.The observed behaviour is very similar to https://github.com/SAP/ui5-webcomponents-react/issues/6193
As the only relevant change in that new version seems to be this one, I suspect it is causing this: https://github.com/SAP/ui5-webcomponents-react/pull/6319
Isolated Example
No response
Reproduction steps
See the attached video for the full repro sequence:
@ui5/webcomponents-react@1.29.9
that contains an MFE on an earlier version, like1.29.8
. Make sure that the MFE uses scoping, and do not configure the UI5 dependency as shared. Both apps should use separate UI5 instances.Expected Behaviour
I expect to be able to use different versions of ui5/webcomponents-react in the MFE and the host application without styles being removed that are still in use.
Screenshots or Videos
https://github.com/user-attachments/assets/13281fc1-6ac7-44dc-9cf2-e8f641e5117c
UI5 Web Components for React Version
1.29.10
UI5 Web Components Version
1.24.9
Browser
Chrome
Operating System
No response
Additional Context
No response
Relevant log output
No response
Organization
SAP Signavio
Declaration