feat(core): enable Rspack runtime mode by default - #1806
Timeless0911 wants to merge 1 commit into
Conversation
Known issues and cold-cache verificationRetested from fresh source archives after clearing all local Rspack filesystem caches and generated integration outputs, using:
1. Missing
|
| Format | Raw delta | Gzip delta |
|---|---|---|
| ESM | +124 B | +570 B |
| CJS | +15,499 B | +9,331 B |
| UMD | +532 B | +233 B |
| MF | +20,557 B | +3,368 B |
| Other JS | +8,575 B | +1,042 B |
| Total | +45,287 B | +14,544 B |
Other JS is included explicitly so that the format rows sum to the reported total.
Current integration-test status
The cold rspack-mode run executes 83 test files / 323 tests:
- 321 passed
- 1 failed
- 1 todo
The only integration execution failure is the missing compatGetDefaultExport import described above.
Running webpack mode against the current PR expectations produces:
- 297 passed
- 25 failed
- 1 todo
All 25 failures are snapshot or generated-string assertion mismatches because this branch has updated those expectations to the rspack-mode representation; they are not webpack-runtime execution failures.
Additional compiler and output correctness regressions that are not covered by the current Rslib integration suite are documented in the follow-up comment.
Given the confirmed integration failure and the additional minimal correctness regressions, this should remain a draft and runtimeMode: 'rspack' should not become the default until those issues are fixed.
Additional output optimization: redundant
|
Additional Rspack 2.1.6 blockersA second audit found three more correctness regressions in the new {
mode: 'none',
target: 'node',
entry: './src/index.js',
experiments: { runtimeMode: 'rspack' },
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.mjs',
module: true,
chunkFormat: false,
chunkLoading: 'import',
library: { type: 'modern-module' },
},
}The common version/mode matrix is:
These regressions start with web-infra-dev/rspack#14741 / merge commit 1. Exported function named
|
Non-blocking output follow-upA cold-cache AST scan found redundant top-level runtime invocations emitted as For this count, “top-level runtime wrapper” is defined precisely as:
Using that definition:
Thirteen additional renderer IIFEs occur inside UMD/MF library shells; they are intentionally excluded from the top-level count above. Conservatively replacing |
Canary cold-revalidation updateThis supersedes the current-status conclusions in the earlier Rspack 2.1.6 comments; those comments remain useful as version-specific history. I removed all local Current validation status:
The five integration failures are stale generated-string expectations for improvements made by this canary: the duplicate public-path declaration, dead SVGR bootstrap, and three long The canary also fixes the previously reported missing The remaining issues are below. Scope note: issues 1 and 2 are not current Rslib integration execution failures. They require specific input binding names under 1. A specific exported
|
a7033e6 to
9074f9c
Compare
9074f9c to
21a2818
Compare
Rspack 2.1.8 revalidationThis supersedes the current-status conclusions in the earlier canary comment. The branch is now rebased onto the latest Validation after the rebase:
Rspack 2.1.8 fixes the previous canary compiler abort for a directly exported, non-referenced No new normal-path output correctness regression was found relative to the canary. The remaining issues are below. 1. Downstream rebundling can still change the observable
|
21a2818 to
f793415
Compare
ffa31a6 to
8dcee3b
Compare
Deploying rslib with
|
| Latest commit: |
1c77067
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://85cca060.rslib.pages.dev |
| Branch Preview URL: | https://david-feat-rspack-runtime-mo.rslib.pages.dev |
8bd3b7d to
7fed7c9
Compare
7fed7c9 to
1c77067
Compare
Motivation
Enable Rspack's runtime implementation by default to align Rslib with the latest Rspack runtime behavior and output.
Changes
tools.rspack.experiments.runtimeModeto'rspack'in the default Rslib configuration.