Skip to content

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

Description

@KalashnikovTV

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions