Skip to content

feat(rsbuild-plugin): apply the build engine for rslib - #3696

Open
upupming wants to merge 1 commit into
fix/auto-lynx-per-environmentfrom
feat/rslib-auto-lynx
Open

feat(rsbuild-plugin): apply the build engine for rslib#3696
upupming wants to merge 1 commit into
fix/auto-lynx-per-environmentfrom
feat/rslib-auto-lynx

Conversation

@upupming

@upupming upupming commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

rslib was left out of the engine entirely, so a library build read none of the
Lynx config and had to mirror the parts it needed by hand.

Apply the engine there too, and skip the plugins that shape or serve a bundle:
rslib assembles its own, and rstest has none.

@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a99556e

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

This PR includes changesets to release 6 packages
Name Type
@lynx-js/react-rsbuild-plugin Patch
@lynx-js/rsbuild-plugin Patch
upgrade-rspeedy Patch
@lynx-js/rspeedy Patch
@lynx-js/react-alias-rsbuild-plugin Patch
create-rspeedy 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

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 84fd0131-67ce-405e-b339-b24b60a1a2cf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@pkg-pr-new

pkg-pr-new Bot commented Aug 31, 2026

Copy link
Copy Markdown
background-only

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/background-only@a99556e

@lynx-js/use-sync-external-store

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/use-sync-external-store@a99556e

@lynx-js/rspeedy

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/rspeedy@a99556e

create-rspeedy

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/create-rspeedy@a99556e

@lynx-js/debug-metadata-rsbuild-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/debug-metadata-rsbuild-plugin@a99556e

@lynx-js/rsbuild-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/rsbuild-plugin@a99556e

@lynx-js/react-rsbuild-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/react-rsbuild-plugin@a99556e

@lynx-js/react-alias-rsbuild-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/react-alias-rsbuild-plugin@a99556e

@lynx-js/vanilla-rsbuild-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/vanilla-rsbuild-plugin@a99556e

upgrade-rspeedy

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/upgrade-rspeedy@a99556e

@lynx-js/websocket

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/websocket@a99556e

@lynx-js/css-serializer

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/css-serializer@a99556e

@lynx-js/debug-metadata

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/debug-metadata@a99556e

@lynx-js/web-core

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/web-core@a99556e

@lynx-js/web-elements

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/web-elements@a99556e

@lynx-js/web-rsbuild-server-middleware

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/web-rsbuild-server-middleware@a99556e

@lynx-js/web-worker-rpc

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/web-worker-rpc@a99556e

@lynx-js/cache-events-webpack-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/cache-events-webpack-plugin@a99556e

@lynx-js/chunk-loading-webpack-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/chunk-loading-webpack-plugin@a99556e

@lynx-js/css-extract-webpack-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/css-extract-webpack-plugin@a99556e

@lynx-js/react-refresh-webpack-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/react-refresh-webpack-plugin@a99556e

@lynx-js/react-webpack-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/react-webpack-plugin@a99556e

@lynx-js/runtime-wrapper-webpack-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/runtime-wrapper-webpack-plugin@a99556e

@lynx-js/template-webpack-plugin

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/template-webpack-plugin@a99556e

@lynx-js/webpack-dev-transport

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/webpack-dev-transport@a99556e

@lynx-js/webpack-runtime-globals

pnpm add https://pkg.pr.new/lynx-family/lynx-stack/@lynx-js/webpack-runtime-globals@a99556e

commit: a99556e

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Aug 31, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 1.1%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 3 improved benchmarks
❌ 1 regressed benchmark
✅ 264 untouched benchmarks
⏩ 26 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime basic-performance-div-1000 5.5 ms 8.4 ms -34.23%
WallTime basic-performance-text-200 3.5 ms 2.8 ms +26.41%
WallTime basic-performance-scroll-view-100 2.1 ms 2 ms +7.45%
WallTime basic-performance-image-100 2 ms 1.8 ms +7.09%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing feat/rslib-auto-lynx (a99556e) with fix/auto-lynx-per-environment (08fa6ae)

Open in CodSpeed

Footnotes

  1. 26 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

relativeci Bot commented Aug 31, 2026

Copy link
Copy Markdown

React MTF Example

#5008 Bundle Size — 210.55KiB (0%).

6717276(current) vs 08fa6ae fix/auto-lynx-per-environment#4994(baseline)

Bundle metrics  no changes
                 Current
#5008
     Baseline
#4994
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 215 215
No change  Duplicate Modules 82 82
No change  Duplicate Code 42.99% 42.99%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#5008
     Baseline
#4994
No change  IMG 111.23KiB 111.23KiB
No change  Other 99.32KiB 99.32KiB

Bundle analysis reportBranch feat/rslib-auto-lynxProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci

relativeci Bot commented Aug 31, 2026

Copy link
Copy Markdown

Web Explorer

#13480 Bundle Size — 1.29MiB (0%).

a99556e(current) vs 08fa6ae fix/auto-lynx-per-environment#13463(baseline)

Bundle metrics  Change 1 change
                 Current
#13480
     Baseline
#13463
No change  Initial JS 45.99KiB 45.99KiB
No change  Initial CSS 2.37KiB 2.37KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 11 11
No change  Assets 13 13
Change  Modules 320(+0.31%) 319
No change  Duplicate Modules 15 15
No change  Duplicate Code 19.37% 19.37%
No change  Packages 14 14
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#13480
     Baseline
#13463
No change  JS 756.75KiB 756.75KiB
No change  Other 564.93KiB 564.93KiB
No change  CSS 2.37KiB 2.37KiB

Bundle analysis reportBranch feat/rslib-auto-lynxProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci

relativeci Bot commented Aug 31, 2026

Copy link
Copy Markdown

React Example

#11897 Bundle Size — 239.07KiB (0%).

a99556e(current) vs 08fa6ae fix/auto-lynx-per-environment#11877(baseline)

Bundle metrics  no changes
                 Current
#11897
     Baseline
#11877
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 220 220
No change  Duplicate Modules 85 85
No change  Duplicate Code 43.55% 43.55%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#11897
     Baseline
#11877
No change  IMG 145.76KiB 145.76KiB
No change  Other 93.32KiB 93.32KiB

Bundle analysis reportBranch feat/rslib-auto-lynxProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci

relativeci Bot commented Aug 31, 2026

Copy link
Copy Markdown

React Example with Element Template

#4152 Bundle Size — 227.26KiB (0%).

a99556e(current) vs 08fa6ae fix/auto-lynx-per-environment#4134(baseline)

Bundle metrics  no changes
                 Current
#4152
     Baseline
#4134
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 175 175
No change  Duplicate Modules 62 62
No change  Duplicate Code 36.46% 36.46%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#4152
     Baseline
#4134
No change  IMG 145.76KiB 145.76KiB
No change  Other 81.5KiB 81.5KiB

Bundle analysis reportBranch feat/rslib-auto-lynxProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci

relativeci Bot commented Aug 31, 2026

Copy link
Copy Markdown

React External

#4991 Bundle Size — 583.94KiB (~+0.01%).

6717276(current) vs 08fa6ae fix/auto-lynx-per-environment#4977(baseline)

Bundle metrics  Change 2 changes
                 Current
#4991
     Baseline
#4977
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 2.56% 2.56%
No change  Chunks 0 0
No change  Assets 3 3
Change  Modules 19(-5%) 20
No change  Duplicate Modules 5 5
Change  Duplicate Code 5.09%(-6.43%) 5.44%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#4991
     Baseline
#4977
Regression  Other 583.94KiB (~+0.01%) 583.94KiB

Bundle analysis reportBranch feat/rslib-auto-lynxProject dashboard


Generated by RelativeCIDocumentationReport issue

@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from d6a79d1 to 64bcbf6 Compare August 31, 2026 06:06
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from 64bcbf6 to db3dce7 Compare August 31, 2026 07:48
Comment on lines +39 to +42
// A test run emits nothing, so the engine has nothing to add. `rslib`
// does emit a bundle and reads the engine config, so the engine is
// applied for it; `pluginLynx` leaves out the plugins that would rewrite
// what an external bundle assembles itself.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just remove verbose comments

@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from db3dce7 to 491716d Compare August 31, 2026 10:46
@upupming upupming changed the title feat(react-rsbuild-plugin): apply the build engine for the rslib caller feat(rsbuild-plugin): apply the build engine for rslib Aug 31, 2026
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from 491716d to 6154f41 Compare August 31, 2026 10:51
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch 2 times, most recently from 325941e to d7102ca Compare August 31, 2026 10:54
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch 2 times, most recently from 3bea4ff to 6be7738 Compare August 31, 2026 11:43
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from 6be7738 to ebac7bd Compare August 31, 2026 14:10
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from ebac7bd to 107779c Compare August 31, 2026 15:13
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from 107779c to 9c8ff9a Compare August 31, 2026 15:20
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch 2 times, most recently from ebc517a to 97544b6 Compare September 1, 2026 03:26
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch 2 times, most recently from 6f622a1 to 1e5d5b1 Compare September 1, 2026 04:19
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from 1e5d5b1 to 6723467 Compare September 1, 2026 06:32
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch 4 times, most recently from 125461e to 6717276 Compare September 1, 2026 13:50
`rslib` was left out of the engine entirely, so a library build read none of the
Lynx config and had to mirror the parts it needed by hand.

Apply the engine there too, and skip the plugins that shape or serve a bundle:
`rslib` assembles its own, and `rstest` has none.
@upupming
upupming force-pushed the feat/rslib-auto-lynx branch from 6717276 to a99556e Compare September 1, 2026 14:42
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.

1 participant