github lynx-family/lynx-stack @lynx-js/react-rsbuild-plugin@0.17.0

latest releases: @lynx-js/web-core@0.21.1, @lynx-js/kitten-lynx-test-infra@0.1.3, @lynx-js/web-worker-rpc@0.21.1...
14 hours ago

Minor Changes

  • Lower let/const to var in the build output for faster QuickJS parsing. The SWC transform-block-scoping pass is added to both the background and main-thread layers (on top of the existing target baseline), and rspack output.environment.const is set to false so bundler-generated runtime code also uses var. (#2755)

  • Support a function form for output.filename.bundle. (#2701)

    output.filename.bundle now accepts a function (context: { lazyBundle: boolean; entryName?: string; platform: string }) => string in 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 dedicated lazyBundle field 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 splitChunks handling, and Rspeedy profile configuration. (#2603)

  • Express the SWC compilation baseline through env (a high targets plus an explicit include transform list) instead of jsc.target. The emitted build output is unchanged for existing projects. (#2748)

    Because env and jsc.target are mutually exclusive in SWC, tools.swc.jsc.target is no longer accepted and now throws a clear error. To downlevel specific syntax, add the corresponding transforms to tools.swc.env.include instead — they extend the base/background baseline (the main thread keeps its fixed es2019 baseline, matching the previous jsc.target behavior).

Patch Changes

  • Enrich the "Unknown property" validation error of pluginReactLynx to point users at pluginLynxConfig when 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

Don't miss a new lynx-stack release

NewReleases is sending notifications on new releases.