-
Notifications
You must be signed in to change notification settings - Fork 85
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: add rscClient.logServerComponent config #1200
Conversation
Walkthrough这次更新主要涉及 Changes
Assessment against linked issues
Note Free review on us!CodeRabbit is offering free reviews until Mon May 27 2024 to showcase some of the refinements we've made. TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- crates/binding/src/lib.rs (1 hunks)
- crates/mako/src/config/config.rs (1 hunks)
- crates/mako/src/features/rsc.rs (2 hunks)
- docs/config.md (1 hunks)
- e2e/fixtures/rsc.client.dynamic_client/mako.config.json (1 hunks)
- e2e/fixtures/rsc.client.error/mako.config.json (1 hunks)
- packages/mako/binding.d.ts (1 hunks)
Files skipped from review due to trivial changes (2)
- e2e/fixtures/rsc.client.dynamic_client/mako.config.json
- e2e/fixtures/rsc.client.error/mako.config.json
Additional Context Used
LanguageTool (9)
docs/config.md (9)
Near line 17: The word ‘mako’ is not correct in this context. Consider using the plural form, adding a determiner like ‘the’ or ‘a’, or adding a preposition like ‘at’ or ‘in’.
Context: ...s" } } ``` Notice: When you're using mako with Umi, prefer to config the bundler ...
Near line 91: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ... used in server-side rendering scenarios, because when server-side rendering, you don't n...
Near line 138: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ing a pure server-side rendering project, because assets files are not needed at this tim...
Near line 268: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ... configuration can only be used with umd, because injecting CSS is not a recommended way ...
Near line 326: Loose punctuation mark.
Context: ... Output related configuration. -path
, output directory -mode
, output mode,...
Near line 341: Loose punctuation mark.
Context: ...on items are supported. -skipModules
, optimize the size by skipping modules w...
Near line 351: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...o setdynamicImportToRequire
totrue
, because the runtime does not yet support node-s...
Near line 394: Loose punctuation mark.
Context: ...r to enable px2rem conversion. -root
, root font size, default is100
- `pro...
Near line 442: Loose punctuation mark.
Context: ... }resolve
configuration. -
alias, alias configuration -
extensions`, fil...
Additional comments not posted (7)
packages/mako/binding.d.ts (2)
143-148
: 新增的rscServer
配置项允许用户更详细地设置 RSC 服务器的行为,这与 PR 目标一致,增强了配置能力。
149-153
: 新增的rscClient
配置项实现了 PR 目标,允许用户自定义 RSC 客户端的错误处理行为。crates/mako/src/features/rsc.rs (1)
40-42
: 根据LogServerComponent
的设置添加的错误处理逻辑正确无误。当设置为Error
时,它会返回一个错误,这与 PR 目标一致,允许可配置的错误处理。crates/binding/src/lib.rs (1)
131-137
: 新增的rscServer
和rscClient
配置项允许用户更详细地设置 RSC 服务器和客户端的行为,这与 PR 目标一致,增强了配置能力。docs/config.md (1)
458-471
: 文档中正确描述了新的rscServer
和rscClient
配置项及其默认值。这对于用户理解至关重要,并且与 PR 目标一致。crates/mako/src/config/config.rs (2)
379-385
: 新增枚举LogServerComponent
定义良好,符合 PR 目标。
388-391
: 更新的结构RscClientConfig
包含了新的字段log_server_component
,类型和序列化都正确。
Close #1195
Summary by CodeRabbit
rscClient
和rscServer
添加了更详细的配置选项。rscClient
现在支持logServerComponent
配置,可以设置为error
或ignore
。rscServer
现在支持emitCSS
和clientComponentTpl
配置。