Replies: 2 comments 1 reply
-
When I remove the babel.config.js and only keep the
|
Beta Was this translation helpful? Give feedback.
-
I can't really help sorry. I'd recommend not using StyledCompoonents with Docusaurus in the first place. We never implemented the hooks to allow proper SSR/SSG support for runtime-based CSS-in-JS libs, and now that the trends is to get rid of them, it's not really our plan to add support. I'm surprised that you got it working because most SC sites would usually have a FOUC before hydration. That being said, you can still use Babel with Rspack, just turn off the |
Beta Was this translation helpful? Give feedback.
-
We enabled the faster build on https://github.com/apify/apify-docs (unfortunately we have some private package registry in there, so not usable as a repro), and the CSS from the styled components are present only on the dev builds, and completely missing out from the production builds. I realized it is probably because the build is no longer using babel, so our babel plugin is not effective (https://github.com/apify/apify-docs/blob/master/babel.config.js#L3). I tried to use https://github.com/rspack-contrib/rsbuild-plugin-styled-components instead, as described in their readme, but I can't make it work.
Will try to build a repro for this when I have some spare time.
Beta Was this translation helpful? Give feedback.
All reactions