Minor Changes
-
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) -
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`, }, }, })
-
Support Rsbuild v2 and Rspack v2 in the React Rsbuild plugin, including the new CSS and JavaScript rule structure, Rspack-only refresh and CSS extraction plugins, top-level
splitChunkshandling, and Rspeedy profile configuration. (#2603) -
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
-
Enrich the "Unknown property" validation error of
pluginReactLynxto point users atpluginLynxConfigwhen they are trying to set a Lynx config. (#2796) -
Updated dependencies [
e0aa6a3,409594b,e0aa6a3,409594b,9fffedb,d8be1ee,409594b,b839f19,ac7d0eb,409594b]:- @lynx-js/css-extract-webpack-plugin@0.8.0
- @lynx-js/template-webpack-plugin@0.12.0
- @lynx-js/react-refresh-webpack-plugin@0.4.0
- @lynx-js/runtime-wrapper-webpack-plugin@0.2.0
- @lynx-js/react-webpack-plugin@0.9.4
- @lynx-js/react-alias-rsbuild-plugin@0.17.0
- @lynx-js/use-sync-external-store@1.5.0