Replies: 1 comment
-
I tracked down the issue to a single incorrect line |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am running Docusaurus V3.7 and I enabled Docusaurus Faster. Everything works wonderfully in development mode but in production after running
yarn build
,yarn serve
the styling of the site is broken (see below)Development:
Production:
I came across 9303 and initially assumed that the issue must be that minification is breaking nested css but I am not convinced this is the case. So far I have tried:
postcss-preset-env
lightningCssMinimizer
In both cases the issue persists. I would expect that if the issue was with minification that the styling would be okay with
lightningCssMinimizer
turned off.Further more if I turn off just
rspackBundler
then the styling is okay so I am thinking it's an issue with how the css is getting bundled.We use a mixture of a custom .scss file and .scss modules (
styles.module.css
imported withimport styles from './styles.module.css'
). The styling which is broken does seem to be related to, for instance:Where
@use "colors"
is a file with:Are there any known issues with styling this way with Docusaurus Faster?
I tried to implement my own rspack config according to the rspack documentation but did not have much luck:
plugins/custom-loaders
:plugins/custom-loaders/package.json"
:package.json
:Run:
docusaurus.config.js
:rspack.config.js
:With this the build throws an error when it encounters
*.module.css
so I suspect that Docusaurus is not picking up therspack.config.js
, or I have done something else incorrectly.What is the correct way to write a custom config for rspack with Docusaurus Faster?
Beta Was this translation helpful? Give feedback.
All reactions