rstackjs / rstackjs/rsbuild-plugin-typed-css-modules

[Question] Ability to run CSS modules type generation separately from the main project build

Open
#70 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
10
Forks
4
Avg merge
2h 34m
Merged PRs (30d)
7

Description

Hello!

Thank you for this useful library. We are using rsbuild-plugin-typed-css-modules in our project, and the plugin works perfectly for generating .d.ts declaration files during the Rsbuild process (dev server or full build).

However, we have the following requirement: to run the compilation and type generation process for CSS modules separately, without triggering a full project build.

Use case:
This is necessary for our CI/CD pipelines and pre-commit hooks. We need to ensure that the TypeScript definitions for styles are up-to-date before running static analysis (e.g., tsc --noEmit) or linting, without spending time on a full application build via Rsbuild.

Questions:

  1. Does the current version of the plugin provide a CLI interface, programmatic API, or a standalone script to generate types exclusively for CSS?
  2. If this is not currently possible, could you recommend a workaround or consider adding this feature in future releases?

Environment:

  • rsbuild-plugin-typed-css-modules version: 1.2.0
  • Rsbuild version: 1.5.4

Thank you in advance for your time and assistance!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by examining the plugin's current Rsbuild integration and CSS Modules type-generation flow, then determine the scope of a standalone CLI or programmatic entry point. Done means types can be generated without a full project build and the CI or pre-commit use case is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.