Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add modules flag for rscCSSModules in stats data #1110

Closed
PeachScript opened this issue Apr 30, 2024 · 2 comments · Fixed by #1167
Closed

add modules flag for rscCSSModules in stats data #1110

PeachScript opened this issue Apr 30, 2024 · 2 comments · Fixed by #1167
Assignees

Comments

@PeachScript
Copy link
Member

RSC Server 构建产出的 stats 数据中的 rscCSSModules 信息,需要提供 modules 标记用来告知 client entry 应当如何引入 Server 构建遇到的 CSS 文件:

{
  // 现状
  rscCSSModules: { path: 'xxx.css' },

  // 期望
  rscCSSModules: { path: 'xxx.css', modules: true },
}

同时 SDK 提供的 parseServerStats 方法中返回的数据结构也要做改变,目前只返回了 string[]

let rscCSSModules = stats.rscCSSModules.map((module) => module.path);

期望是返回原始结构由集成框架来处理引入

@stormslowly
Copy link
Member

@PeachScript 如果一个 css 同时被 css module import 和 普通 import 会有是什么处理方式?

@PeachScript
Copy link
Member Author

@stormslowly 从代码预期的角度上来看,得有两条数据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants