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

未关闭
#70 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
38/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
typescript
领域
build-system

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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!

主要语言
TypeScript
星标
11
派生
5
平均合并
3 天 18 小时
30 天内合并 PR
3

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rstackjs/rsbuild-plugin-typed-css-modules 的其他 Issue

查看 rstackjs/rsbuild-plugin-typed-css-modules 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。