Skip to content

feat(template-webpack-plugin): parallelize TASM encode in a shared worker pool#2634

Merged
upupming merged 4 commits into
mainfrom
feat/parallel-template-encode
May 14, 2026
Merged

feat(template-webpack-plugin): parallelize TASM encode in a shared worker pool#2634
upupming merged 4 commits into
mainfrom
feat/parallel-template-encode

Conversation

@upupming
Copy link
Copy Markdown
Collaborator

@upupming upupming commented May 14, 2026

Summary

  • Move template encoding into a process-wide tinypool worker pool so multi-entry builds encode in parallel (cpus().length - 1 threads) instead of serializing on the main thread.
  • Watch-mode rebuilds reuse warm workers across compiles — the pool is a static field on LynxEncodePlugin, lazily spawned on first encode.
  • Buffer.from(uint8Array) rewraps the postMessage-demoted buffer back to a real Buffer so downstream consumers (rspack's WasmHash) can still call .copy() on it.
  • The worker file URL always resolves to the built lib/worker/encode.js, so the static pool initializer works both from src/ (in-tree tests) and lib/ (installed consumers).

Test plan

  • pnpm exec rstest run in packages/webpack/template-webpack-plugin — 346 / 346 pass (including 2 new tests in test/encode-worker-pool.test.ts)
  • pnpm build in examples/react succeeds with the new pool path
  • New tests assert pool.completed += N for N-entry builds and that rebuild does not spawn new workers

Summary by CodeRabbit

  • New Features

    • Enabled parallel TASM template encoding for multi-entry builds.
    • Optimized watch-mode rebuilds with encoder worker reuse for faster iteration.
  • Chores

    • Tightened Node.js version requirement to ^18.14 || >=19.4.

Review Change Stack

…rker pool

Move template encoding into a process-wide `tinypool` worker pool so:
- Multi-entry builds encode in parallel up to `cpus().length - 1` threads
  instead of serializing on the main thread.
- Watch-mode rebuilds reuse warm workers across compiles.

`Buffer.from(uint8Array)` rewraps the postMessage-demoted buffer back to
a real `Buffer` so downstream consumers (rspack's `WasmHash`) can still
call `.copy()` on it.

The worker file URL always resolves to the built `lib/worker/encode.js`
so the static pool initializer works both from `src/` (in-tree tests)
and `lib/` (installed consumers).
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

🦋 Changeset detected

Latest commit: d3dfcfe

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

This PR includes changesets to release 3 packages
Name Type
@lynx-js/template-webpack-plugin Patch
@lynx-js/react-rsbuild-plugin Patch
@lynx-js/react-alias-rsbuild-plugin 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
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

📝 Walkthrough

Walkthrough

This PR introduces parallel TASM template encoding via a shared Tinypool worker pool in the webpack plugin, enabling concurrent multi-entry builds and warm worker reuse during watch-mode rebuilds. The implementation adds a worker module, configures a static pool in LynxEncodePlugin, updates package dependencies and the public API surface, and includes tests verifying parallel execution and worker thread reuse.

Changes

Parallel Template Encoding via Tinypool

Layer / File(s) Summary
Worker module for isolated encoding
packages/webpack/template-webpack-plugin/src/worker/encode.ts
New encode.ts exports EncodeWorkerOptions interface and an async encode function that dynamically loads TASM and executes template encoding in an isolated worker thread context, returning serialized EncodeResult.
LynxEncodePlugin pool configuration and hook
packages/webpack/template-webpack-plugin/src/LynxEncodePlugin.ts
Imports ESM interop utilities, resolves the worker module path via require.resolve, initializes a static encodePool Tinypool with CPU-aware thread sizing, and updates the templateHooks.encode hook to dispatch encoding through the shared pool instead of calling TASM directly; restructures the hook to deserialize the worker's buffer result.
Package dependencies, Node version, and API surface
packages/webpack/template-webpack-plugin/package.json, packages/webpack/template-webpack-plugin/etc/template-webpack-plugin.api.md, .changeset/parallel-template-encode.md
Adds tinypool runtime dependency and tightens Node engine constraint to `^18.14
Worker pool parallelism and reuse verification tests
packages/webpack/template-webpack-plugin/test/encode-worker-pool.test.ts
Adds test suite with runWebpack helper that confirms multi-entry builds dispatch parallel encode tasks through the pool (checking completed counter and thread count), and validates that subsequent compiles in the same process reuse warm worker threads without spawning new ones.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • lynx-family/lynx-stack#2519: Both PRs modify the template-webpack-plugin's LynxEncodePlugin encode/emit pipeline around cssDiagnostics (the main PR moves encoding into a Tinypool worker that returns cssDiagnostics, while the retrieved PR changes how cssDiagnostics sourcemaps are resolved per template and wires it into beforeEmit).

Suggested reviewers

  • colinaaa
  • luhc228

Poem

🐰 In threads so warm, our TASM spins fast,
Parallel pools where workers are cast,
Multi-entry builds now dance with glee,
Reused warm threads in harmony! 🔄✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 directly describes the main change: parallelizing TASM template encoding using a shared worker pool in the template-webpack-plugin.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/parallel-template-encode

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
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

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

Files with missing lines Patch % Lines
...bpack/template-webpack-plugin/src/worker/encode.ts 7.69% 12 Missing ⚠️
...ck/template-webpack-plugin/src/LynxEncodePlugin.ts 36.36% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

upupming added 2 commits May 14, 2026 16:21
…rker/encode.js')`

Drops the conditional `.ts`/`.js` detection and `--experimental-strip-types`
plumbing. Tests now require `lib/` to be built first, but the resolution
itself is a single line and works the same in src/ and lib/ contexts via
`createRequire(import.meta.url)`.
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 14, 2026

Merging this PR will not alter performance

✅ 81 untouched benchmarks
⏩ 26 skipped benchmarks1


Comparing feat/parallel-template-encode (d3dfcfe) with main (189be6c)

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
Copy link
Copy Markdown

relativeci Bot commented May 14, 2026

React Example

#8214 Bundle Size — 236.51KiB (0%).

d3dfcfe(current) vs 189be6c main#8210(baseline)

Bundle metrics  no changes
                 Current
#8214
     Baseline
#8210
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 197 197
No change  Duplicate Modules 80 80
No change  Duplicate Code 44.87% 44.87%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8214
     Baseline
#8210
No change  IMG 145.76KiB 145.76KiB
No change  Other 90.75KiB 90.75KiB

Bundle analysis reportBranch feat/parallel-template-encodeProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 14, 2026

React External

#1328 Bundle Size — 693.04KiB (0%).

d3dfcfe(current) vs 189be6c main#1324(baseline)

Bundle metrics  no changes
                 Current
#1328
     Baseline
#1324
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 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1328
     Baseline
#1324
No change  Other 693.04KiB 693.04KiB

Bundle analysis reportBranch feat/parallel-template-encodeProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 14, 2026

React Example with Element Template

#480 Bundle Size — 199.83KiB (0%).

d3dfcfe(current) vs 189be6c main#476(baseline)

Bundle metrics  Change 2 changes
                 Current
#480
     Baseline
#476
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
Change  Modules 85(+1.19%) 84
No change  Duplicate Modules 25 25
Change  Duplicate Code 39.96%(-0.05%) 39.98%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#480
     Baseline
#476
No change  IMG 145.76KiB 145.76KiB
No change  Other 54.08KiB 54.08KiB

Bundle analysis reportBranch feat/parallel-template-encodeProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 14, 2026

Web Explorer

#9788 Bundle Size — 901.38KiB (0%).

d3dfcfe(current) vs 189be6c main#9784(baseline)

Bundle metrics  Change 2 changes
                 Current
#9788
     Baseline
#9784
No change  Initial JS 45.06KiB 45.06KiB
No change  Initial CSS 2.22KiB 2.22KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 9 9
No change  Assets 11 11
Change  Modules 227(-1.3%) 230
No change  Duplicate Modules 11 11
Change  Duplicate Code 27.23%(+0.04%) 27.22%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#9788
     Baseline
#9784
No change  JS 497.1KiB 497.1KiB
No change  Other 402.06KiB 402.06KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch feat/parallel-template-encodeProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 14, 2026

React MTF Example

#1347 Bundle Size — 207.46KiB (0%).

d3dfcfe(current) vs 189be6c main#1343(baseline)

Bundle metrics  no changes
                 Current
#1347
     Baseline
#1343
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 192 192
No change  Duplicate Modules 77 77
No change  Duplicate Code 44.38% 44.38%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1347
     Baseline
#1343
No change  IMG 111.23KiB 111.23KiB
No change  Other 96.23KiB 96.23KiB

Bundle analysis reportBranch feat/parallel-template-encodeProject dashboard


Generated by RelativeCIDocumentationReport issue

colinaaa
colinaaa previously approved these changes May 14, 2026
Comment thread packages/webpack/template-webpack-plugin/src/LynxEncodePlugin.ts Outdated
`availableParallelism()` already reflects cgroup CPU limits on container
hosts, so subtracting one for the main thread is wasted capacity rather
than safety margin. Drops the `-1`.

Bumps `engines.node` to `^18.14 || >=19.4` — the version range where the
backported `os.availableParallelism()` is actually available.
@upupming upupming marked this pull request as ready for review May 14, 2026 10:04
@upupming upupming requested a review from luhc228 as a code owner May 14, 2026 10:04
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d3dfcfe6ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/webpack/template-webpack-plugin/src/LynxEncodePlugin.ts
Copy link
Copy Markdown
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.

🧹 Nitpick comments (2)
packages/webpack/template-webpack-plugin/test/encode-worker-pool.test.ts (1)

11-11: ⚡ Quick win

Use fileURLToPath for cross-platform compatibility.

new URL(import.meta.url).pathname can produce invalid paths on Windows (e.g., /C:/path/to/file). Import and use fileURLToPath from node:url instead:

🔧 Suggested fix
-import { dirname } from 'node:path';
+import { dirname } from 'node:path';
+import { fileURLToPath } from 'node:url';

-const context = dirname(new URL(import.meta.url).pathname);
+const context = dirname(fileURLToPath(import.meta.url));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/webpack/template-webpack-plugin/test/encode-worker-pool.test.ts` at
line 11, Replace the platform-unsafe pathname extraction used to build context:
instead of dirname(new URL(import.meta.url).pathname) use
fileURLToPath(import.meta.url) and dirname(...) around that; import
fileURLToPath from 'node:url' and update the code that defines the context
variable (the usage of dirname and import.meta.url) to call
fileURLToPath(import.meta.url) so paths are correct on Windows.
packages/webpack/template-webpack-plugin/src/LynxEncodePlugin.ts (1)

21-23: 💤 Low value

Clarify worker path resolution assumption.

The worker path require.resolve('../lib/worker/encode.js') assumes the TypeScript source has been compiled to lib/ before this code runs. The PR summary states this "enables the static pool initializer to work both from src/ (in-tree tests) and lib/ (installed consumers)," but actually it requires lib/worker/encode.js to exist in both cases.

Since tests pass, the build likely happens before test execution. Consider clarifying this in a comment or ensuring the README documents the build requirement for running tests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/webpack/template-webpack-plugin/src/LynxEncodePlugin.ts` around
lines 21 - 23, The code currently sets ENCODE_WORKER_PATH via
require.resolve('../lib/worker/encode.js') which assumes compiled output exists;
update the file to either (a) add a short clarifying comment above
ENCODE_WORKER_PATH documenting that tests and consumers require the TS -> lib
build step, or (b) implement a robust resolution fallback for ENCODE_WORKER_PATH
that first tries require.resolve('../lib/worker/encode.js') and if that fails
falls back to resolving the in-tree source (e.g., ../src/worker/encode.ts or
../src/worker/encode.js) using createRequire(import.meta.url); reference the
ENCODE_WORKER_PATH constant and the createRequire/import.meta.url call when
changing the resolution logic, or update the README to state the build
requirement for running tests if you choose the comment-only option.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/webpack/template-webpack-plugin/src/LynxEncodePlugin.ts`:
- Around line 21-23: The code currently sets ENCODE_WORKER_PATH via
require.resolve('../lib/worker/encode.js') which assumes compiled output exists;
update the file to either (a) add a short clarifying comment above
ENCODE_WORKER_PATH documenting that tests and consumers require the TS -> lib
build step, or (b) implement a robust resolution fallback for ENCODE_WORKER_PATH
that first tries require.resolve('../lib/worker/encode.js') and if that fails
falls back to resolving the in-tree source (e.g., ../src/worker/encode.ts or
../src/worker/encode.js) using createRequire(import.meta.url); reference the
ENCODE_WORKER_PATH constant and the createRequire/import.meta.url call when
changing the resolution logic, or update the README to state the build
requirement for running tests if you choose the comment-only option.

In `@packages/webpack/template-webpack-plugin/test/encode-worker-pool.test.ts`:
- Line 11: Replace the platform-unsafe pathname extraction used to build
context: instead of dirname(new URL(import.meta.url).pathname) use
fileURLToPath(import.meta.url) and dirname(...) around that; import
fileURLToPath from 'node:url' and update the code that defines the context
variable (the usage of dirname and import.meta.url) to call
fileURLToPath(import.meta.url) so paths are correct on Windows.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 77007ba3-0e7e-4aa9-82fe-7b82437cf4f9

📥 Commits

Reviewing files that changed from the base of the PR and between a973c54 and d3dfcfe.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .changeset/parallel-template-encode.md
  • packages/webpack/template-webpack-plugin/etc/template-webpack-plugin.api.md
  • packages/webpack/template-webpack-plugin/package.json
  • packages/webpack/template-webpack-plugin/src/LynxEncodePlugin.ts
  • packages/webpack/template-webpack-plugin/src/worker/encode.ts
  • packages/webpack/template-webpack-plugin/test/encode-worker-pool.test.ts

@upupming upupming merged commit 7b8d63c into main May 14, 2026
54 of 55 checks passed
@upupming upupming deleted the feat/parallel-template-encode branch May 14, 2026 10:58
colinaaa pushed a commit that referenced this pull request May 18, 2026
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/autolink-codegen@0.1.0

### Minor Changes

- Add the Native Autolink codegen package.
([#2601](#2601))

## create-lynx-extension@0.1.0

### Minor Changes

- Add the Native Autolink create-extension package.
([#2587](#2587))

### Patch Changes

- Use published package versions for scaffolded autolink codegen
dependencies instead of workspace placeholders.
([#2628](#2628))

- Fix npm bin symlink entrypoint detection for the create extension CLI.
([#2623](#2623))

## @lynx-js/react@0.121.0

### Minor Changes

- Support `React.createElement(type, props, children)` API.
([#2360](#2360))

    ```jsx
    React.createElement("view", { style }, <text>hello</text>);
    // equivalent to
    <view style={style}>
      <text>hello</text>
    </view>;

    React.createElement(MyComponent, { style }, <view />);
    // equivalent to
    <MyComponent style={style}>
      <view />
    </MyComponent>;
    ```

### Patch Changes

- Clear transient snapshot child props when removed snapshot subtrees
are detached, preventing compiled `$*` child references from retaining
deleted list holder or list item subtrees after removal.
([#2590](#2590))

- Add `createPortal` for rendering a subtree into a different ReactLynx
element identified by a `NodesRef`.
([#2543](#2543))

    ```tsx
    function App() {
      const [host, setHost] = useState(null);
      return (
        <view>
          <view ref={setHost} />
          {host && createPortal(<text>hi</text>, host)}
        </view>
      );
    }
    ```

- Default `fireEvent` to `bubbles: true` for the TouchEvent family in
testing-library to match Lynx runtime semantics, and stop reassigning
the read-only `Event.prototype` accessors which threw `TypeError` in
strict mode.
([#2532](#2532))

- Set `bundle-url` on lazy bundle border elements.
([#2537](#2537))

- Stop warning when `runWorklet` receives an invalid or missing
main-thread function object. Invalid worklet contexts are still ignored,
but nullish handler values no longer produce noisy `MainThreadFunction:
Invalid function object` console output.
([#2586](#2586))

- Retain main-thread worklet context references before offscreen
snapshot elements are materialized, so event, ref, gesture, and spread
callbacks stay alive until the DOM update path can attach them.
([#2592](#2592))

- Update the @lynx-js/tasm dependency to 0.0.39 and align React template
attribute descriptors with it.
([#2643](#2643))

- Avoid retaining transformed nested worklet contexts after worklet
transformation.
([#2591](#2591))

Nested worklets transformed by the worklet runtime now keep their
context recovery metadata through a weak reference, preventing cached
transformed worklet functions from keeping list-item worklet contexts
alive.

## @lynx-js/docs-mcp-server@0.2.3

### Patch Changes

- fix(docs-mcp): recursively crawl and register nested llms.txt
resources ([#2317](#2317))

## @lynx-js/rspeedy@0.14.4

### Patch Changes

- feat(qrcode): support get entry from api exposed from
rspeedy.env.entries
([#2551](#2551))

- Updated dependencies
\[[`ad1f90f`](ad1f90f)]:
    -   @lynx-js/chunk-loading-webpack-plugin@0.3.4
    -   @lynx-js/web-rsbuild-server-middleware@0.20.4
    -   @lynx-js/cache-events-webpack-plugin@0.0.3

## @lynx-js/lynx-bundle-rslib-config@0.3.3

### Patch Changes

- Update the @lynx-js/tasm dependency to 0.0.39 and align React template
attribute descriptors with it.
([#2643](#2643))

## @lynx-js/qrcode-rsbuild-plugin@0.4.7

### Patch Changes

- feat(qrcode): support get entry from api exposed from
rspeedy.env.entries
([#2551](#2551))

## @lynx-js/react-rsbuild-plugin@0.16.2

### Patch Changes

- Updated dependencies
\[[`3e627b3`](3e627b3),
[`7b8d63c`](7b8d63c),
[`13a0776`](13a0776),
[`a973c54`](a973c54),
[`353b1b7`](353b1b7)]:
    -   @lynx-js/template-webpack-plugin@0.11.1
    -   @lynx-js/react-refresh-webpack-plugin@0.3.6
    -   @lynx-js/react-alias-rsbuild-plugin@0.16.2
    -   @lynx-js/use-sync-external-store@1.5.0
    -   @lynx-js/react-webpack-plugin@0.9.2
    -   @lynx-js/css-extract-webpack-plugin@0.7.1

## @lynx-js/web-core@0.20.4

### Patch Changes

- Always clone touch event lists when creating cross-thread events so
synthetic touch events only carry structured-clone-safe primitive
fields. ([#2636](#2636))

- Conditionally pass Card and Component params based on cardType in
background thread.
([#2610](#2610))

- Add bidirectional decode worker heartbreak liveness messages.
([#2599](#2599))

- Add web support for the `<frame>` element by mapping it to
`<lynx-view>`.
([#2604](#2604))

- Stop redeclaring `fetch` as a chunk-scope binding. Reusing the host
([#2562](#2562))
`window.fetch` from BTS chunks (instead of capturing the no-op stub the
    chunk wrapper used to install) lets the renderer issue real network
    requests.

- Updated dependencies
\[[`c1db603`](c1db603)]:
    -   @lynx-js/web-elements@0.12.2
    -   @lynx-js/web-worker-rpc@0.20.4

## @lynx-js/web-elements@0.12.2

### Patch Changes

- fix: xmarkdown create img incorrectly
([#2540](#2540))

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

### Patch Changes

- Override `__webpack_require__.e` so a single sync-then chunk load (the
([#2597](#2597))
typical lazy bundle case) bypasses `Promise.all`. It will make first
screen
in main thread can load lazy bundle synchronously when using dynamic
import.

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

### Patch Changes

- Widen `@lynx-js/react-webpack-plugin` peer range to include `^0.9.0`.
([#2626](#2626))

## @lynx-js/template-webpack-plugin@0.11.1

### Patch Changes

- feat(web): enable web binary template by default
([#2545](#2545))

The default encoding format for the web platform template has been
changed from JSON to Binary.

    **Benefits for developers:**

- **Smaller output size:** Binary templates are more compact than JSON
strings, reducing the final bundle size.
- **Faster load performance:** Binary templates parse faster than JSON
in the runtime, improving the time-to-interactive for web applications.

    **How to turn off this feature:**
If you encounter any issues with the new binary template format, you can
revert to the previous JSON format by setting the environment variable
`EXPERIMENTAL_USE_WEB_BINARY_TEMPLATE` to `'false'` or `'0'` before
running your build commands. For example:
    `EXPERIMENTAL_USE_WEB_BINARY_TEMPLATE=false rspeedy build`

**Upgrade to `@lynx-js/web-core@0.20.2` could support the new output
format**

See [`@lynx-js/web-core`
Changelog](https://lynx-stack.dev/changelog/lynx-js--web-core)

- Run TASM template encoding in a shared `tinypool` worker pool so
multi-entry builds encode in parallel and watch-mode rebuilds reuse warm
workers. ([#2634](#2634))

- Make `LynxTemplatePlugin.getLynxTemplatePluginHooks` a cross-module
singleton so duplicate copies of this package (e.g. from npm hoist
conflicts) share the same hooks per compilation.
([#2624](#2624))

- Update the @lynx-js/tasm dependency to 0.0.39 and align React template
attribute descriptors with it.
([#2643](#2643))

- Updated dependencies
\[[`ee79eff`](ee79eff),
[`ded4de9`](ded4de9),
[`cf01e94`](cf01e94),
[`b989c1c`](b989c1c),
[`8417e68`](8417e68)]:
    -   @lynx-js/web-core@0.20.4

## @lynx-js/react-umd@0.121.0



## create-rspeedy@0.14.4



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



## upgrade-rspeedy@0.14.4



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



## @lynx-js/web-worker-rpc@0.20.4

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants