SCSS Setup with prerendering and CSS Modules

Hey there,

Does anyone have SCSS support setup with prerendering and CSS Modules? I am having some trouble getting it setup (when I run yarn rw prerender dry-run the imported SCSS module cannot be found) and wanted to know if others had successfully got it working?

Would be useful to see:

  • vite.config.ts
  • One of the components that are being prerendered which is importing the SCSS file
  • web/tsconfig.json
  • Anything else relevant

Thanks!

Hi @oreid , I’m having an identical problem. Running Mantine which uses CSS modules, and they aren’t available on prerender. We’re probably going to have to dig in to what prerender is doing to fix this :frowning:

Thanks for the reply @raph90. For what it’s worth I’m also using Mantine so wouldn’t be surprised if that’s related to the issue.

Hi, would it be possible for you to share a repo with a reproduction that the Core Team could launch in GitPod to see the behavior? If you can, adding this info to a new issue Sign in to GitHub · GitHub would help us see what might be going on.

Thanks!

1 Like

Hi @dthyresson, I’ll work on putting together an example repo and share it via a Github Issue.

All setup and filed as requested: [Bug?]: Prerender is not working with Sass · Issue #9991 · redwoodjs/redwood · GitHub

2 Likes