Skip to content

Conversation

@HuJean
Copy link
Collaborator

@HuJean HuJean commented Nov 25, 2025

Closed #1957

Summary by CodeRabbit

  • Bug Fixes

    • Webpack runtime variables are now preserved during transformation and bundling.
  • Tests

    • Added tests that verify preservation of webpack runtime variables at runtime.
  • Chores

    • Declared a patch release to ship the fix and added test configuration for the runtime test case.

✏️ Tip: You can customize this high-level summary in your review settings.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2025

🦋 Changeset detected

Latest commit: 0944a34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lynx-js/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

📝 Walkthrough

Walkthrough

Adds preservation of webpack runtime variables by declaring them in a shared constant and injecting that list into dead-code-elimination (DCE) simplifier configurations; includes tests and a webpack test case to verify the variables are retained.

Changes

Cohort / File(s) Summary
Changeset Declaration
.changeset/blue-shirts-scream.md
Declares a patch release for @lynx-js/react and documents preserving webpack runtime variables during bundling.
Webpack Variables Constant Definition
packages/react/transform/crates/swc_plugins_shared/utils.rs
Adds public constant WEBPACK_VARS = &["__webpack_require__", "__webpack_public_path__"].
DCE Configuration Integration
packages/react/transform/src/lib.rs,
packages/react/transform/swc-plugin-reactlynx/src/lib.rs
Imports WEBPACK_VARS, constructs top_retain from it, and injects top_retain into simplify::Config for both DCE passes to retain webpack runtime variables.
Transform Test Fixture
packages/react/transform/__test__/fixture.spec.js
Adds a test "should keep webpack runtime variables" asserting that runtime vars like __webpack_public_path__ and __webpack_require__.p are preserved by the transform.
Webpack Plugin Runtime Test Case
packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx,
packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/rspack.config.js,
packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/test.config.cjs
Adds a runtime test that assigns webpack runtime properties and asserts they're preserved, plus rspack and test configs for the case.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Heterogeneous changes across Rust, SWC plugin glue, JS tests, and test configs require checking correctness in multiple languages and build contexts.
  • Attention points:
    • Ensure WEBPACK_VARS list covers all runtime variables needed (e.g., any additional webpack runtime names).
    • Verify top_retain insertion into both DCE passes matches existing config patterns and cloning is correct.
    • Confirm tests accurately reflect runtime behavior and test configs wire up correctly.

Suggested reviewers

  • hzy
  • gaoachao
  • upupming

Poem

🐰 I nibble code in moonlit stacks,
I guard the paths that webpack tracks,
With tiny paws I mark the place,
So runtime vars will keep their grace. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: preventing webpack runtime variables from being removed during transformation, which directly addresses the linked issue #1957.
Linked Issues check ✅ Passed The PR successfully implements the core requirement from #1957: preserving webpack runtime variable assignments like webpack_public_path by adding WEBPACK_VARS constant and injecting it into DCE configuration.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the webpack runtime variable issue: constants definition, transform logic updates, test cases for webpack runtime preservation, and test configurations are all focused on the stated objective.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch p/hujing/transfrom-shaking

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 758d256 and f2be6c3.

📒 Files selected for processing (1)
  • .changeset/blue-shirts-scream.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

For contributions, generate and commit a Changeset describing your changes

Files:

  • .changeset/blue-shirts-scream.md
🧠 Learnings (15)
📓 Common learnings
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1616
File: packages/webpack/cache-events-webpack-plugin/test/cases/not-cache-events/lazy-bundle/index.js:3-3
Timestamp: 2025-08-27T12:42:01.095Z
Learning: In webpack, properties like __webpack_require__.lynx_ce are injected during compilation/build time when webpack processes modules and generates bundles, not at runtime when dynamic imports execute. Tests for such properties don't need to wait for dynamic imports to complete.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1558
File: .changeset/solid-squids-fall.md:2-2
Timestamp: 2025-08-19T11:25:36.127Z
Learning: In the lynx-family/lynx-stack repository, changesets should use the exact package name from package.json#name, not generic or unscoped names. Each package has its own specific scoped name (e.g., "lynx-js/react-transform" for packages/react/transform).
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1497
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_full_static.js:9-10
Timestamp: 2025-08-12T16:09:32.413Z
Learning: In the Lynx stack, functions prefixed with `__` that are called in transformed code may be injected globally by the Lynx Engine at runtime rather than exported from the React runtime package. For example, `__CreateFrame` is injected globally by the Lynx Engine, not exported from lynx-js/react.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1670
File: packages/webpack/css-extract-webpack-plugin/src/loader.ts:244-251
Timestamp: 2025-09-23T08:53:56.927Z
Learning: In webpack CSS extraction plugins, when storing per-module dependencies in a compiler-scoped map like cssModuleId2Deps, the map should not be reset at compilation start because in incremental compilation (watch mode/HMR), only changed files pass through the loader. Unchanged modules need their dependency information to persist between compilations so the plugin can access all modules' dependencies when generating CSS output.
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, empty changeset files (containing only `---\n\n---`) are used for internal changes that modify src/** files but don't require meaningful release notes, such as private package changes or testing-only modifications. This satisfies CI requirements without generating user-facing release notes.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-07-22T09:26:16.722Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:26:16.722Z
Learning: In the lynx-family/lynx-stack repository, CI checks require changesets when files matching the pattern "src/**" are modified (as configured in .changeset/config.json). For internal changes that don't need meaningful changesets, an empty changeset file is used to satisfy the CI requirement while not generating any release notes.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:23:07.797Z
Learning: In the lynx-family/lynx-stack repository, changesets are only required for meaningful changes to end-users such as bugfixes and features. Internal/development changes like chores, refactoring, or removing debug info do not need changeset entries.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-19T11:25:36.127Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1558
File: .changeset/solid-squids-fall.md:2-2
Timestamp: 2025-08-19T11:25:36.127Z
Learning: In the lynx-family/lynx-stack repository, changesets should use the exact package name from package.json#name, not generic or unscoped names. Each package has its own specific scoped name (e.g., "lynx-js/react-transform" for packages/react/transform).

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-29T06:43:40.182Z
Learnt from: CR
Repo: lynx-family/lynx-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T06:43:40.182Z
Learning: Applies to .changeset/*.md : For contributions, generate and commit a Changeset describing your changes

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-27T12:42:01.095Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1616
File: packages/webpack/cache-events-webpack-plugin/test/cases/not-cache-events/lazy-bundle/index.js:3-3
Timestamp: 2025-08-27T12:42:01.095Z
Learning: In webpack, properties like __webpack_require__.lynx_ce are injected during compilation/build time when webpack processes modules and generates bundles, not at runtime when dynamic imports execute. Tests for such properties don't need to wait for dynamic imports to complete.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-23T08:53:56.927Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1670
File: packages/webpack/css-extract-webpack-plugin/src/loader.ts:244-251
Timestamp: 2025-09-23T08:53:56.927Z
Learning: In webpack CSS extraction plugins, when storing per-module dependencies in a compiler-scoped map like cssModuleId2Deps, the map should not be reset at compilation start because in incremental compilation (watch mode/HMR), only changed files pass through the loader. Unchanged modules need their dependency information to persist between compilations so the plugin can access all modules' dependencies when generating CSS output.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-21T08:46:54.494Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1370
File: packages/webpack/cache-events-webpack-plugin/src/LynxCacheEventsRuntimeModule.ts:23-27
Timestamp: 2025-08-21T08:46:54.494Z
Learning: In Lynx webpack runtime modules, the team prioritizes performance and simplicity over defensive runtime error handling. They prefer relying on compile-time type safety (TypeScript) rather than adding runtime checks like try-catch blocks or type validation, especially for performance-critical code like cache event setup/cleanup functions.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-28T08:46:43.177Z
Learnt from: f0rdream
Repo: lynx-family/lynx-stack PR: 1835
File: packages/react/worklet-runtime/src/workletRuntime.ts:52-55
Timestamp: 2025-09-28T08:46:43.177Z
Learning: The legacy worklet path with `_lepusWorkletHash` in `packages/react/worklet-runtime/src/workletRuntime.ts` is preserved for compatibility with MTS (Mini-app Threading Service) that doesn't support Initial Frame Rendering. This path will not be touched in current implementations.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-12T16:09:32.413Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1497
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_full_static.js:9-10
Timestamp: 2025-08-12T16:09:32.413Z
Learning: In the Lynx stack, functions prefixed with `__` that are called in transformed code may be injected globally by the Lynx Engine at runtime rather than exported from the React runtime package. For example, `__CreateFrame` is injected globally by the Lynx Engine, not exported from lynx-js/react.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-11T05:57:18.212Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1305
File: packages/testing-library/testing-environment/src/index.ts:255-258
Timestamp: 2025-08-11T05:57:18.212Z
Learning: In the ReactLynx testing environment (`packages/testing-library/testing-environment/src/index.ts`), the dual assignment pattern `target.console.method = console.method = () => {}` is required for rstest compatibility. This is because rstest provides `console` in an IIFE (Immediately Invoked Function Expression), and both the target and global console need to have these methods defined for proper test execution.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-18T04:43:54.426Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1771
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_component_with_static_sibling.js:2-2
Timestamp: 2025-09-18T04:43:54.426Z
Learning: In the lynx-family/lynx-stack repository, the `add_pure_comment` function in packages/react/transform/src/swc_plugin_compat/mod.rs (around lines 478-482) is specifically for `wrapWithLynxComponent` calls, not `createSnapshot` calls. The PURE comment injection for `createSnapshot` is handled separately in swc_plugin_snapshot/mod.rs.

Applied to files:

  • .changeset/blue-shirts-scream.md
🔇 Additional comments (1)
.changeset/blue-shirts-scream.md (1)

1-5: Verify that all affected packages are included in the changeset.

The changeset format and description look good and accurately reflect the PR objective from issue #1957. However, according to the AI summary context, changes are made to packages/react/transform (which contains @lynx-js/react-transform). Verify whether this package should also be listed in the changeset.

If @lynx-js/react-transform is a private package (marked with "private": true in its package.json), it may not require a separate changeset entry per learnings. However, ensure that all modified packages intended for release are properly documented.

Also verify that the package names exactly match the "name" field in their respective package.json files, as per guideline requirements.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/react/transform/src/lib.rs 0.00% 3 Missing ⚠️
...es/react/transform/swc-plugin-reactlynx/src/lib.rs 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
.changeset/blue-shirts-scream.md (1)

1-5: Align changeset wording with actual webpack variable names

To avoid confusion, it would be better if the description used the exact identifiers you’re preserving:

- Keep webpack runtime variables, like **webpack_public_path**, **webpack_require**.p, etc.
+ Keep webpack runtime variables like `__webpack_public_path__` and `__webpack_require__.p`, etc.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4695100 and 758d256.

📒 Files selected for processing (8)
  • .changeset/blue-shirts-scream.md (1 hunks)
  • packages/react/transform/__test__/fixture.spec.js (1 hunks)
  • packages/react/transform/crates/swc_plugins_shared/utils.rs (1 hunks)
  • packages/react/transform/src/lib.rs (3 hunks)
  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs (3 hunks)
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx (1 hunks)
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/rspack.config.js (1 hunks)
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/test.config.cjs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

For contributions, generate and commit a Changeset describing your changes

Files:

  • .changeset/blue-shirts-scream.md
🧠 Learnings (23)
📓 Common learnings
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1616
File: packages/webpack/cache-events-webpack-plugin/test/cases/not-cache-events/lazy-bundle/index.js:3-3
Timestamp: 2025-08-27T12:42:01.095Z
Learning: In webpack, properties like __webpack_require__.lynx_ce are injected during compilation/build time when webpack processes modules and generates bundles, not at runtime when dynamic imports execute. Tests for such properties don't need to wait for dynamic imports to complete.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1370
File: packages/webpack/cache-events-webpack-plugin/src/LynxCacheEventsRuntimeModule.ts:23-27
Timestamp: 2025-08-21T08:46:54.494Z
Learning: In Lynx webpack runtime modules, the team prioritizes performance and simplicity over defensive runtime error handling. They prefer relying on compile-time type safety (TypeScript) rather than adding runtime checks like try-catch blocks or type validation, especially for performance-critical code like cache event setup/cleanup functions.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1670
File: packages/webpack/css-extract-webpack-plugin/src/loader.ts:244-251
Timestamp: 2025-09-23T08:53:56.927Z
Learning: In webpack CSS extraction plugins, when storing per-module dependencies in a compiler-scoped map like cssModuleId2Deps, the map should not be reset at compilation start because in incremental compilation (watch mode/HMR), only changed files pass through the loader. Unchanged modules need their dependency information to persist between compilations so the plugin can access all modules' dependencies when generating CSS output.
Learnt from: f0rdream
Repo: lynx-family/lynx-stack PR: 1835
File: packages/react/worklet-runtime/src/workletRuntime.ts:52-55
Timestamp: 2025-09-28T08:46:43.177Z
Learning: The legacy worklet path with `_lepusWorkletHash` in `packages/react/worklet-runtime/src/workletRuntime.ts` is preserved for compatibility with MTS (Mini-app Threading Service) that doesn't support Initial Frame Rendering. This path will not be touched in current implementations.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1497
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_full_static.js:9-10
Timestamp: 2025-08-12T16:09:32.413Z
Learning: In the Lynx stack, functions prefixed with `__` that are called in transformed code may be injected globally by the Lynx Engine at runtime rather than exported from the React runtime package. For example, `__CreateFrame` is injected globally by the Lynx Engine, not exported from lynx-js/react.
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1238
File: packages/react/runtime/src/debug/component-stack.ts:70-90
Timestamp: 2025-07-18T04:27:18.291Z
Learning: The component-stack.ts file in packages/react/runtime/src/debug/component-stack.ts is a direct fork from https://github.com/preactjs/preact/blob/main/debug/src/component-stack.js. The team prefers to keep it aligned with the upstream Preact version and may contribute improvements back to Preact in the future.
📚 Learning: 2025-10-29T10:28:27.519Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1899
File: packages/react/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/lib.rs/should_static_extract_dynamic_inline_style.js:20-24
Timestamp: 2025-10-29T10:28:27.519Z
Learning: Files inside packages/react/transform/crates/swc_plugin_snapshot/tests/__swc_snapshots__/ are auto-generated test snapshot files and should not be manually updated. Any issues with the generated code should be addressed in the code generator/transform logic, not in the snapshots themselves.

Applied to files:

  • packages/react/transform/crates/swc_plugins_shared/utils.rs
  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/test.config.cjs
  • packages/react/transform/__test__/fixture.spec.js
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/rspack.config.js
  • packages/react/transform/src/lib.rs
📚 Learning: 2025-09-10T11:42:36.855Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1714
File: packages/react/transform/Cargo.toml:19-19
Timestamp: 2025-09-10T11:42:36.855Z
Learning: In packages/react/transform/Cargo.toml, the crate uses serde derive macros (#[derive(Serialize, Deserialize)]) in multiple files including src/esbuild.rs and src/swc_plugin_extract_str/mod.rs, so the "derive" feature is required when migrating to workspace dependencies.

Applied to files:

  • packages/react/transform/crates/swc_plugins_shared/utils.rs
  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs
  • packages/react/transform/src/lib.rs
📚 Learning: 2025-11-05T03:26:52.546Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1916
File: packages/react/transform/crates/swc_plugin_snapshot/lib.rs:9-9
Timestamp: 2025-11-05T03:26:52.546Z
Learning: In the lynx-stack repository's swc_core v47 upgrade (PR #1916), the import `use swc_core::atoms as swc_atoms;` is required in files that use the `quote!` macro (e.g., packages/react/transform/crates/swc_plugin_snapshot/lib.rs, swc_plugin_list/lib.rs, swc_plugin_worklet/gen_stmt.rs) even though swc_atoms may not appear explicitly in the source code. This is because the quote! macro generates code that internally references swc_atoms. Removing this import causes compiler error: "failed to resolve: use of unresolved module or unlinked crate `swc_atoms`".

Applied to files:

  • packages/react/transform/crates/swc_plugins_shared/utils.rs
  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs
  • packages/react/transform/src/lib.rs
📚 Learning: 2025-09-18T04:43:54.426Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1771
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_component_with_static_sibling.js:2-2
Timestamp: 2025-09-18T04:43:54.426Z
Learning: In packages/react/transform/src/swc_plugin_compat/mod.rs, the `add_pure_comment` function at lines 478-482 is specifically for `wrapWithLynxComponent` calls, not `createSnapshot` calls. The PURE comment injection for `createSnapshot` is handled separately in swc_plugin_snapshot/mod.rs. These are two distinct code paths that should be treated differently.

Applied to files:

  • packages/react/transform/crates/swc_plugins_shared/utils.rs
  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs
  • packages/react/transform/__test__/fixture.spec.js
  • packages/react/transform/src/lib.rs
📚 Learning: 2025-08-27T12:42:01.095Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1616
File: packages/webpack/cache-events-webpack-plugin/test/cases/not-cache-events/lazy-bundle/index.js:3-3
Timestamp: 2025-08-27T12:42:01.095Z
Learning: In webpack, properties like __webpack_require__.lynx_ce are injected during compilation/build time when webpack processes modules and generates bundles, not at runtime when dynamic imports execute. Tests for such properties don't need to wait for dynamic imports to complete.

Applied to files:

  • packages/react/transform/crates/swc_plugins_shared/utils.rs
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/test.config.cjs
  • packages/react/transform/__test__/fixture.spec.js
  • .changeset/blue-shirts-scream.md
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx
📚 Learning: 2025-09-18T04:43:54.426Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1771
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_component_with_static_sibling.js:2-2
Timestamp: 2025-09-18T04:43:54.426Z
Learning: In the lynx-family/lynx-stack repository, the `add_pure_comment` function in packages/react/transform/src/swc_plugin_compat/mod.rs (around lines 478-482) is specifically for `wrapWithLynxComponent` calls, not `createSnapshot` calls. The PURE comment injection for `createSnapshot` is handled separately in swc_plugin_snapshot/mod.rs.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs
  • packages/react/transform/__test__/fixture.spec.js
  • packages/react/transform/src/lib.rs
📚 Learning: 2025-08-21T07:21:51.621Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1562
File: packages/react/transform/src/swc_plugin_snapshot/jsx_helpers.rs:261-283
Timestamp: 2025-08-21T07:21:51.621Z
Learning: In packages/react/transform/src/swc_plugin_snapshot/jsx_helpers.rs, the team prefers to keep the original unreachable! logic for JSXSpreadChild in jsx_is_children_full_dynamic function rather than implementing defensive error handling.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs
  • packages/react/transform/src/lib.rs
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.

Applied to files:

  • packages/react/transform/swc-plugin-reactlynx/src/lib.rs
  • packages/react/transform/__test__/fixture.spec.js
  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/test.config.cjs
  • packages/react/transform/__test__/fixture.spec.js
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/rspack.config.js
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/rspeedy/create-rspeedy/template-react-vitest-rltl-js/vitest.config.js` is a template file for scaffolding new Rspeedy projects, not a test configuration that should be included in the main vitest projects array.

Applied to files:

  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/test.config.cjs
  • packages/react/transform/__test__/fixture.spec.js
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/rspack.config.js
📚 Learning: 2025-09-28T08:46:43.177Z
Learnt from: f0rdream
Repo: lynx-family/lynx-stack PR: 1835
File: packages/react/worklet-runtime/src/workletRuntime.ts:52-55
Timestamp: 2025-09-28T08:46:43.177Z
Learning: The legacy worklet path with `_lepusWorkletHash` in `packages/react/worklet-runtime/src/workletRuntime.ts` is preserved for compatibility with MTS (Mini-app Threading Service) that doesn't support Initial Frame Rendering. This path will not be touched in current implementations.

Applied to files:

  • packages/react/transform/__test__/fixture.spec.js
  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-11T05:57:18.212Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1305
File: packages/testing-library/testing-environment/src/index.ts:255-258
Timestamp: 2025-08-11T05:57:18.212Z
Learning: In the ReactLynx testing environment (`packages/testing-library/testing-environment/src/index.ts`), the dual assignment pattern `target.console.method = console.method = () => {}` is required for rstest compatibility. This is because rstest provides `console` in an IIFE (Immediately Invoked Function Expression), and both the target and global console need to have these methods defined for proper test execution.

Applied to files:

  • packages/react/transform/__test__/fixture.spec.js
  • packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx
📚 Learning: 2025-09-23T08:54:39.966Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1670
File: packages/webpack/css-extract-webpack-plugin/test/hotCases/hot/hot-update-json/dual-thread/__snapshot__/index.css:6-8
Timestamp: 2025-09-23T08:54:39.966Z
Learning: In the lynx-stack CSS extract webpack plugin tests, many test fixture CSS files intentionally use invalid CSS syntax like `color: 'red';` with quoted values. The snapshots correctly reflect this invalid CSS from the source fixtures. To fix CSS validation issues, the source fixture files should be updated first, then snapshots regenerated, rather than manually editing snapshots.

Applied to files:

  • packages/react/transform/__test__/fixture.spec.js
📚 Learning: 2025-08-12T16:09:32.413Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1497
File: packages/react/transform/tests/__swc_snapshots__/src/swc_plugin_snapshot/mod.rs/basic_full_static.js:9-10
Timestamp: 2025-08-12T16:09:32.413Z
Learning: In the Lynx stack, functions prefixed with `__` that are called in transformed code may be injected globally by the Lynx Engine at runtime rather than exported from the React runtime package. For example, `__CreateFrame` is injected globally by the Lynx Engine, not exported from lynx-js/react.

Applied to files:

  • packages/react/transform/__test__/fixture.spec.js
  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-21T08:46:54.494Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1370
File: packages/webpack/cache-events-webpack-plugin/src/LynxCacheEventsRuntimeModule.ts:23-27
Timestamp: 2025-08-21T08:46:54.494Z
Learning: In Lynx webpack runtime modules, the team prioritizes performance and simplicity over defensive runtime error handling. They prefer relying on compile-time type safety (TypeScript) rather than adding runtime checks like try-catch blocks or type validation, especially for performance-critical code like cache event setup/cleanup functions.

Applied to files:

  • packages/react/transform/__test__/fixture.spec.js
  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, empty changeset files (containing only `---\n\n---`) are used for internal changes that modify src/** files but don't require meaningful release notes, such as private package changes or testing-only modifications. This satisfies CI requirements without generating user-facing release notes.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-07-22T09:26:16.722Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:26:16.722Z
Learning: In the lynx-family/lynx-stack repository, CI checks require changesets when files matching the pattern "src/**" are modified (as configured in .changeset/config.json). For internal changes that don't need meaningful changesets, an empty changeset file is used to satisfy the CI requirement while not generating any release notes.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:23:07.797Z
Learning: In the lynx-family/lynx-stack repository, changesets are only required for meaningful changes to end-users such as bugfixes and features. Internal/development changes like chores, refactoring, or removing debug info do not need changeset entries.

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-08-19T11:25:36.127Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1558
File: .changeset/solid-squids-fall.md:2-2
Timestamp: 2025-08-19T11:25:36.127Z
Learning: In the lynx-family/lynx-stack repository, changesets should use the exact package name from package.json#name, not generic or unscoped names. Each package has its own specific scoped name (e.g., "lynx-js/react-transform" for packages/react/transform).

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-29T06:43:40.182Z
Learnt from: CR
Repo: lynx-family/lynx-stack PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-29T06:43:40.182Z
Learning: Applies to .changeset/*.md : For contributions, generate and commit a Changeset describing your changes

Applied to files:

  • .changeset/blue-shirts-scream.md
📚 Learning: 2025-09-23T08:53:56.927Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1670
File: packages/webpack/css-extract-webpack-plugin/src/loader.ts:244-251
Timestamp: 2025-09-23T08:53:56.927Z
Learning: In webpack CSS extraction plugins, when storing per-module dependencies in a compiler-scoped map like cssModuleId2Deps, the map should not be reset at compilation start because in incremental compilation (watch mode/HMR), only changed files pass through the loader. Unchanged modules need their dependency information to persist between compilations so the plugin can access all modules' dependencies when generating CSS output.

Applied to files:

  • .changeset/blue-shirts-scream.md
🧬 Code graph analysis (4)
packages/react/transform/crates/swc_plugins_shared/utils.rs (2)
packages/react/transform/src/lib.rs (1)
  • WEBPACK_VARS (322-322)
packages/react/transform/swc-plugin-reactlynx/src/lib.rs (1)
  • WEBPACK_VARS (121-121)
packages/react/transform/swc-plugin-reactlynx/src/lib.rs (2)
packages/react/transform/crates/swc_plugins_shared/utils.rs (1)
  • get_relative_path (72-88)
packages/react/transform/src/lib.rs (1)
  • WEBPACK_VARS (322-322)
packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/rspack.config.js (1)
packages/webpack/react-webpack-plugin/test/create-react-config.js (1)
  • createConfig (79-129)
packages/react/transform/src/lib.rs (1)
packages/react/transform/swc-plugin-reactlynx/src/lib.rs (1)
  • WEBPACK_VARS (121-121)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build / Build (Windows)
  • GitHub Check: build / Build (Ubuntu)
  • GitHub Check: test-rust / Test (Ubuntu)
🔇 Additional comments (7)
packages/react/transform/crates/swc_plugins_shared/utils.rs (1)

90-93: Shared webpack runtime identifier list looks good

Exposing WEBPACK_VARS here is a clean way to centralize the webpack runtime identifiers for all transforms; the types and values look correct.

packages/react/transform/__test__/fixture.spec.js (1)

1653-1672: Regression test for webpack runtime preservation is appropriate

This test exercises the transform end-to-end with both preserved (__webpack_public_path__, __webpack_require__.p) and non-preserved (__webpack_test__) globals and fits the existing snapshot style in this suite.

packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/index.jsx (1)

1-11: Webpack runtime test wiring is consistent and targeted

The fixture and assertion pattern cleanly verifies that bundling preserves __webpack_require__.j and the __webpack_public_path____webpack_require__.p link, matching how other webpack runtime tests are structured in this repo.

Based on learnings, this matches the existing approach for checking webpack runtime globals.

packages/react/transform/src/lib.rs (1)

63-67: Use of WEBPACK_VARS in DCE config is coherent with the intended behavior

Deriving a top_retain vector from WEBPACK_VARS and threading it into simplify::dce::Config for both simplify_pass_1 and the main simplify_pass keeps the NAPI transform path aligned with the shared webpack runtime allowlist, and the allocation/cloning pattern is reasonable for this hot path.

Please double-check against the swc_core version in this workspace that dce.top_retain still expects a Vec<Atom> (or equivalent) and that its semantics match what you need for retaining __webpack_require__ and __webpack_public_path__ at the top level.

Also applies to: 322-323, 328-332, 456-459

packages/react/transform/swc-plugin-reactlynx/src/lib.rs (1)

33-37: Plugin transform now shares the webpack retention list with the NAPI path

Mirroring top_retain initialization from WEBPACK_VARS into both simplify passes here keeps the SWC plugin behavior in lockstep with packages/react/transform/src/lib.rs, so webpack runtime globals are treated consistently regardless of entry path.

As with the NAPI transform, please confirm against the current swc_core docs that simplify::dce::Config::top_retain behaves as expected for these globals in the plugin environment.

Also applies to: 121-122, 127-131, 233-236

packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/test.config.cjs (1)

1-7: Test case config matches expected bundle outputs

The exported bundlePath entries align with the createConfig setup and provide the necessary artifacts for this webpack-runtime case.

packages/webpack/react-webpack-plugin/test/cases/webpack-runtime/basic/rspack.config.js (1)

1-7: Rspack test configuration correctly reuses shared React config

Importing createConfig from the shared helper and spreading it into a context-scoped default export is a straightforward way to hook this case into the existing webpack test harness.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 25, 2025

CodSpeed Performance Report

Merging #1958 will not alter performance

Comparing p/hujing/transfrom-shaking (0944a34) with main (55cb796)

Summary

✅ 63 untouched
⏩ 3 skipped1

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link

relativeci bot commented Nov 25, 2025

Web Explorer

#6340 Bundle Size — 377.5KiB (0%).

0944a34(current) vs 55cb796 main#6337(baseline)

Bundle metrics  Change 2 changes
                 Current
#6340
     Baseline
#6337
No change  Initial JS 146.32KiB 146.32KiB
No change  Initial CSS 32.38KiB 32.38KiB
Change  Cache Invalidation 0% 8.57%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 231(+0.87%) 229
No change  Duplicate Modules 16 16
Change  Duplicate Code 2.95%(-0.34%) 2.96%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#6340
     Baseline
#6337
No change  JS 243.18KiB 243.18KiB
No change  Other 101.94KiB 101.94KiB
No change  CSS 32.38KiB 32.38KiB

Bundle analysis reportBranch p/hujing/transfrom-shakingProject dashboard


Generated by RelativeCIDocumentationReport issue

hzy
hzy previously approved these changes Nov 25, 2025
gaoachao
gaoachao previously approved these changes Nov 25, 2025
colinaaa
colinaaa previously approved these changes Nov 26, 2025
Copy link
Collaborator

@colinaaa colinaaa left a comment

Choose a reason for hiding this comment

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

Overall LGTM

Co-authored-by: Qingyu Wang <[email protected]>
Signed-off-by: HuJean <[email protected]>
@HuJean HuJean dismissed stale reviews from colinaaa, gaoachao, and hzy via f2be6c3 November 26, 2025 12:09
@HuJean HuJean requested review from colinaaa and gaoachao November 26, 2025 13:14
@HuJean HuJean enabled auto-merge (squash) November 26, 2025 13:14
@HuJean HuJean merged commit 09adc7e into main Nov 27, 2025
46 of 48 checks passed
@HuJean HuJean deleted the p/hujing/transfrom-shaking branch November 27, 2025 01:34
colinaaa pushed a commit that referenced this pull request Dec 7, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/[email protected]

### Minor Changes

- **BREAKING CHANGE**: Delay the `createSnapshot` operation to
`Snapshot` constructor to speed up IFR.
([#1899](#1899))

    This change refactors how snapshots are created and registered:

    -   Removed the `entryUniqID` function
- Snapshots are now lazily created via `snapshotCreatorMap` instead of
eagerly at bundle load time
- Snapshot IDs are generated at compile time and only prefixed with
`${globDynamicComponentEntry}:` for standalone lazy bundles

    **⚠️ Lazy Bundle Compatibility:**

- **Backward compatibility (new runtime → old lazy bundles)**: ✅
**Supported**. Old lazy bundles will work with the new runtime.

- **Forward compatibility (old runtime → new lazy bundles)**: ❌ **NOT
Supported**. Lower version consumers **will not be able to load lazy
bundles produced by this version** due to the changed snapshot creation
mechanism.

    **Migration guidance**:
If you are using lazy bundles, ensure all consumers are upgraded to this
version or later **before** deploying lazy bundles built with this
version. For monorepo setups, coordinate the upgrade across all
consuming applications.

### Patch Changes

- Preserve assignments to webpack runtime variables like
`__webpack_public_path__`, `__webpack_require__.p`, etc.
([#1958](#1958))

- Fixed blank screen issues with nested lists. Lazily created nested
lists were being flushed but not properly recorded, causing rendering
failures. ([#1963](#1963))

- fix: export `createRef` and `useRef` from
`@lynx-js/react/legacy-react-runtime`
([#1953](#1953))

## @lynx-js/[email protected]

### Minor Changes

- **BREAKING CHANGE**: Require `@lynx-js/rspeedy` 0.12.0.
([#1951](#1951))

### Patch Changes

- Support Yarn Plug'n'Play.
([#1964](#1964))

- Updated dependencies
\[[`738d44d`](738d44d),
[`5bbb439`](5bbb439),
[`3692a16`](3692a16),
[`d2e290b`](d2e290b),
[`738d44d`](738d44d)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Minor Changes

- **BREAKING CHANGE**: Use resolver from Rspack.
([#1964](#1964))

    The `createLazyResolver` now requires an `rspack` parameter:

    ```diff
- function createLazyResolver(directory: string, conditionNames:
string[]): (request: string) => Promise<string>;
+ function createLazyResolver(rspack: rspack, directory: string,
conditionNames: string[]): (request: string) => Promise<string>;
    ```

### Patch Changes

- Support Yarn Plug'n'Play.
([#1964](#1964))

## @lynx-js/[email protected]

### Minor Changes

- feat: new flex:val impl
([#1979](#1979))

### Patch Changes

- Updated dependencies
\[[`40c3a1a`](40c3a1a),
[`46bd5ee`](46bd5ee)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Minor Changes

- feat: new flex:val impl
([#1979](#1979))

### Patch Changes

- fix: x-input display should add !important to avoid override
([#1960](#1960))

-   Updated dependencies \[]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Bump Rsbuild v1.6.9 with Rspack v1.6.5.
([#1967](#1967))

-   Updated dependencies \[]:
    -   @lynx-js/[email protected]

## [email protected]

### Patch Changes

- Bump `@rsbuild/plugin-type-check` v1.3.1.
([#1964](#1964))

## @lynx-js/[email protected]

### Patch Changes

- Add `@lynx-js/lynx-bundle-rslib-config` for bundling Lynx bundle with
[Rslib](https://rslib.rs/):
([#1943](#1943))

    ```js
    // rslib.config.js
import { defineExternalBundleRslibConfig } from
"@lynx-js/lynx-bundle-rslib-config";

    export default defineExternalBundleRslibConfig({
      id: "utils-lib",
      source: {
        entry: {
          utils: "./src/utils.ts",
        },
      },
    });
    ```

## @lynx-js/[email protected]

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- chore: update web-elements version of web-explorer
([#1962](#1962))

## @lynx-js/[email protected]

### Patch Changes

- fix: capture and bind event listener should be trigger correctly
([#1972](#1972))

- fix: the l-p-comp-uid of page should be '1'
([#1970](#1970))

-   Updated dependencies \[]:
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Updated dependencies
\[[`40c3a1a`](40c3a1a),
[`46bd5ee`](46bd5ee)]:
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]
    -   @lynx-js/[email protected]

## @lynx-js/[email protected]

### Patch Changes

- Set main thread JS basename to `lepusCode.filename` in tasm encode
data. It will ensure a filename is reported on MTS error without
devtools enabled.
([#1949](#1949))

## @lynx-js/[email protected]

### Patch Changes

- Set main thread JS basename to `lepusCode.filename` in tasm encode
data. It will ensure a filename is reported on MTS error without
devtools enabled.
([#1949](#1949))

- Upgrade `@lynx-js/tasm` to `0.0.20`.
([#1943](#1943))

- refactor: move web style info generation to the encode phase
([#1975](#1975))

## [email protected]



## @lynx-js/[email protected]



## @lynx-js/[email protected]



## @lynx-js/[email protected]



## @lynx-js/[email protected]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: shaking module variables in transform

5 participants