Skip to content

feat(pack): support config.define #1956

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

Merged
merged 4 commits into from
Jun 16, 2025
Merged

feat(pack): support config.define #1956

merged 4 commits into from
Jun 16, 2025

Conversation

fireairforce
Copy link
Member

@fireairforce fireairforce commented Jun 15, 2025

More info refer to: #1953

这个 MR 修复两个问题:

  • NAPI 包调用的时候没消费 config.define
  • Rust 的 CLI 侧调用的时候也没消费 config.define

产物参考:

image

同时在 NAPI 包的 TS 层以及 Rust CLI 层做了修复,后续要考虑给配置添加 e2e 产物 snapshot 测试了

@fireairforce fireairforce changed the title [WIP]feat(pack): support config.define feat(pack): support config.define Jun 15, 2025
@fireairforce fireairforce requested a review from xusd320 June 15, 2025 15:32
.iter()
.map(|(key, value)| {
let value_str = match value {
Value::String(s) => format!("\"{}\"", s),
Copy link
Contributor

@xusd320 xusd320 Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 serde_json::stringify, 如果 value 本身是个 "xxx", 外面直接套一层 "" 会挂掉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated 了

@xusd320 xusd320 merged commit 70947e8 into next Jun 16, 2025
3 checks passed
@xusd320 xusd320 deleted the fix-napi-build branch June 16, 2025 03:53
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 this pull request may close these issues.

2 participants