Skip to content

Support CSS modules in server components #617

@oscarvz

Description

@oscarvz

Hi, there! Given Redwood is using Vite - that comes with an out-of-the-box setup for CSS modules - I'd expected CSS modules to work straight away too.

I'm running into two issues right now:

  1. CSS module imports aren't recognized by TS (easy fix by adding them to vite.d.ts)
  2. For the CSS modules to be properly processed by Vite, I have to add the 'use client' directive to each file - regardless of if they're actual client or server components.

I did find the Tailwind & ShadCN tutorials in the docs, but nothing is mentioned about other more lightweight approaches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.xIssues planned for a minor release after 1.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions