Minor Changes
-
Add unified
debug-metadata.jsonper Lynx entry. (#2642)- New
@lynx-js/debug-metadataschema package (zero-dep). - New
@lynx-js/debug-metadata-rsbuild-pluginemits the file and serves?field=…queries in dev. - JS
//# sourceMappingURL=and tasmtemplateDebugUrlrepointed at the new endpoint. debug-info.jsonno longer written to disk.- Auto-registered by Rspeedy — zero user config.
- New
-
Lower
let/consttovarin the build output for faster QuickJS parsing. The SWCtransform-block-scopingpass is added to both the background and main-thread layers (on top of the existing target baseline), and rspackoutput.environment.constis set tofalseso bundler-generated runtime code also usesvar. (#2755) -
Default
output.sourceMap.jstosource-mapforlynxenvironments in production when the project leaves it unset. The production default was previouslyfalse(no JS source map), which left the emitteddebug-metadata.jsonwithout source maps and made reverse-resolution of production errors impossible without manual config. Non-lynxenvironments (e.g.web) are unchanged, and any explicitoutput.sourceMapis respected. (#2642) -
refactor: set target to es2017 by default (#2783)
-
Support a function form for
output.filename.bundle. (#2701)output.filename.bundlenow accepts a function(context: { lazyBundle: boolean; entryName?: string; platform: string }) => stringin addition to a string. The function is called once for the main bundle (lazyBundle: false) and once for the lazy bundles (lazyBundle: true), so a single config can control both the main bundle filename and the lazy bundle filename — without a dedicatedlazyBundlefield or a custom plugin.import { execSync } from 'node:child_process' import { defineConfig } from '@lynx-js/rspeedy' const gitHash = execSync('git rev-parse --short HEAD').toString().trim() export default defineConfig({ output: { filename: { bundle: ({ lazyBundle, platform }) => lazyBundle ? `my-lazy-bundles/[name].[fullhash]-${gitHash}.bundle` : `[name].${platform}.bundle`, }, }, })
-
BREAKING CHANGE (#2603)
Rsbuild v2 deprecated
performance.chunkSplit, so configure chunk splitting with Rspeedy's top-levelsplitChunksoption instead. Rspeedy still accepts the oldperformance.chunkSplitshape as a deprecated compatibility path, but new configs should migrate:import { defineConfig } from '@lynx-js/rspeedy'; export default defineConfig({ - performance: { - chunkSplit: { - strategy: 'single-vendor', - }, - }, + splitChunks: { + preset: 'single-vendor', + }, });Move aliases from
source.aliastoresolve.alias:import { defineConfig } from '@lynx-js/rspeedy'; export default defineConfig({ - source: { - alias: { - '@': './src', - }, - }, + resolve: { + alias: { + '@': './src', + }, + }, });The bundled Rspack/Rsbuild toolchain is updated to
@rspack/core2.0.6,@rspack/cli2.0.6,@rspack/dev-server2.0.3, and@rsbuild/core2.0.11. -
Align Rspeedy, the QRCode plugin, and the Lynx bundle Rslib config Node.js engine metadata with Rsbuild v2 and Rslib requirements: Node.js 20.19+ or 22.12+. (#2789)
-
In Lynx environments, all
.mapassets are removed before emit. (#2804) -
Express the SWC compilation baseline through
env(a hightargetsplus an explicitincludetransform list) instead ofjsc.target. The emitted build output is unchanged for existing projects. (#2748)Because
envandjsc.targetare mutually exclusive in SWC,tools.swc.jsc.targetis no longer accepted and now throws a clear error. To downlevel specific syntax, add the corresponding transforms totools.swc.env.includeinstead — they extend the base/background baseline (the main thread keeps its fixed es2019 baseline, matching the previousjsc.targetbehavior).
Patch Changes
-
Update the
tools.cssExtractdocumentation example to useCssExtractRspackPlugininstead of the removedCssExtractWebpackPlugin. (#2838) -
Updated dependencies [
a839d59,409594b,e16f86c,e0aa6a3,d08154d,409594b,445c6c7]:- @lynx-js/debug-metadata-rsbuild-plugin@0.1.0
- @lynx-js/cache-events-webpack-plugin@0.1.0
- @lynx-js/chunk-loading-webpack-plugin@0.4.0
- @lynx-js/webpack-dev-transport@0.3.0
- @lynx-js/web-rsbuild-server-middleware@0.21.1