Repack v5 : Nativewind transformed styles of host get overridden by those of mini-apps (Module Federation \ Super-app) #1032
-
Hello, I have been trying to get Repack v5 and Nativewind going in my React Native Super App. While I can successfully get Nativewind to work for the host, it doesn't seem to work well in the super-app / micro-apps setup. When I start the app and load a host screen, the Nativewind styling is applied properly to the elements. However, when I visit a mini (/remote) app screen, the Nativewind styles get applied to that but with a warning thrown: "Warning: Cannot update a component ( Now if I go back to the On debugging, I found that the /node_modules/@callstack/repack-plugin-nativewind/dist/loader.js
The problem is that when the mini-app loads, it calls Any help with this would be greatly appreciated. I'm currently using Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hi @sahajarora1286, thank you for a very detailed investigation, you've managed to pinpoint the right cause there 👍 to fix this, in your MF2 plugin configuration you have to add a deep import for shared: {
// your other shared dependencies
// add this entry, make sure for it to have `/` at the end!
'react-native-css-interop/': {
singleton: true,
eager: true, // switch to false in miniapp
requiredVersion: '*' // or version of CSS interop installed
}
} let me know if this helps 👍 |
Beta Was this translation helpful? Give feedback.
Hi @sahajarora1286,
thank you for a very detailed investigation, you've managed to pinpoint the right cause there 👍
to fix this, in your MF2 plugin configuration you have to add a deep import for
react-native-css-interop
:let me know if this helps 👍