You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently am working on an application that uses the following setup:
React DOM Server with renderToPipeableStream for streaming SSR
Module federation to load modules at runtime
The issue i've run into is that the remote modules that use styled-jsx do not detect the provided StyleRegistry because the vendor code is bundled into the remote. Module Federation supports sharing dependencies however this does not seem to be working at all with styled-jsx.
I have tested this and can confirm that the vendor code for "styled-jsx" is never shared amongst packages.
Is there any way to make styled-jsx play nicely with module federation's dependency sharing?
I'm not sure how things work under the hood and how webpack bundles the transpiled code from styled-jsx but somehow I need all my remotes to use the same StyleRegistryContext so that I can render the style tags on the server side.
Any ideas?
Best,
Adam
The text was updated successfully, but these errors were encountered:
Hi.
I currently am working on an application that uses the following setup:
renderToPipeableStream
for streaming SSRThe issue i've run into is that the remote modules that use styled-jsx do not detect the provided
StyleRegistry
because the vendor code is bundled into the remote. Module Federation supports sharing dependencies however this does not seem to be working at all with styled-jsx.I have tested this and can confirm that the vendor code for "styled-jsx" is never shared amongst packages.
Is there any way to make
styled-jsx
play nicely with module federation's dependency sharing?I'm not sure how things work under the hood and how webpack bundles the transpiled code from
styled-jsx
but somehow I need all my remotes to use the sameStyleRegistryContext
so that I can render the style tags on the server side.Any ideas?
Best,
Adam
The text was updated successfully, but these errors were encountered: