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

feat: also emit stats data in watch mode #1107

Closed
PeachScript opened this issue Apr 29, 2024 · 0 comments · Fixed by #1108
Closed

feat: also emit stats data in watch mode #1107

PeachScript opened this issue Apr 29, 2024 · 0 comments · Fixed by #1108

Comments

@PeachScript
Copy link
Member

在 RSC 构建的场景下,前后构建会基于 stats.json 的内容串联,但目前 watch 模式下 Mako 不会写入磁盘,所以在 dev 下串不起来:

if self.context.config.stats && !self.context.args.watch {
write_stats(&stats, self);
}

可能的解法:

  1. 修改上述判断,在 watch 模式下也将 stats.json 写入磁盘
  2. 将 stats 数据通过 napi 传给 js hooks,不落盘
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.

1 participant