github lynx-family/lynx-stack @lynx-js/rspeedy@0.15.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

  • Add unified debug-metadata.json per Lynx entry. (#2642)

    • New @lynx-js/debug-metadata schema package (zero-dep).
    • New @lynx-js/debug-metadata-rsbuild-plugin emits the file and serves ?field=… queries in dev.
    • JS //# sourceMappingURL= and tasm templateDebugUrl repointed at the new endpoint.
    • debug-info.json no longer written to disk.
    • Auto-registered by Rspeedy — zero user config.
  • 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)

  • Default output.sourceMap.js to source-map for lynx environments in production when the project leaves it unset. The production default was previously false (no JS source map), which left the emitted debug-metadata.json without source maps and made reverse-resolution of production errors impossible without manual config. Non-lynx environments (e.g. web) are unchanged, and any explicit output.sourceMap is respected. (#2642)

  • refactor: set target to es2017 by default (#2783)

  • 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`,
        },
      },
    })
  • BREAKING CHANGE (#2603)

    Rsbuild v2 deprecated performance.chunkSplit, so configure chunk splitting with Rspeedy's top-level splitChunks option instead. Rspeedy still accepts the old performance.chunkSplit shape 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.alias to resolve.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/core 2.0.6, @rspack/cli 2.0.6, @rspack/dev-server 2.0.3, and @rsbuild/core 2.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 .map assets are removed before emit. (#2804)

  • 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

  • Update the tools.cssExtract documentation example to use CssExtractRspackPlugin instead of the removed CssExtractWebpackPlugin. (#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

Don't miss a new lynx-stack release

NewReleases is sending notifications on new releases.