For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/guide/build/rspeedy.md.
Lynx
  • English
  • Upgrade from Rspeedy

    Rspeedy will be maintained for the long term. You can still visit the previous Rspeedy website.

    Rspeedy (@lynx-js/rspeedy) is Lynx's previous build tool. Built on Rsbuild, it provides the rspeedy CLI and uses lynx.config.ts for configuration. We now recommend Rsbuild with pluginLynx, using Rsbuild's configuration and plugin ecosystem directly.

    Rspeedy and pluginLynx share the same build engine. Migration mainly involves dependencies, CLI commands and configuration; application code does not need to be rewritten.

    Replace the dependency

    Remove @lynx-js/rspeedy and install @rsbuild/core.

    Update CLI commands

    Replace rspeedy dev, rspeedy build, rspeedy preview and rspeedy inspect with rsbuild dev, rsbuild build, rsbuild preview and rsbuild inspect respectively.

    Replace the configuration file

    Rename lynx.config.ts to rsbuild.config.ts and import defineConfig from @rsbuild/core instead of @lynx-js/rspeedy.

    Update build-time types

    Replace @lynx-js/rspeedy/client with @rsbuild/core/types in the types array in tsconfig.json, keeping the other entries.

    Expand shorthand configuration

    Change string values for source.entry and output.filename to object form.

    Move Lynx-specific options

    Move options such as output.filename.bundle and performance.profile into pluginLynx({ ... }). Add pluginLynx explicitly to plugins when you need these options; automatic application uses the defaults.

    Differences between Rspeedy and Rsbuild

    Both approaches use pluginLynx to build Lynx bundles. The main differences are their CLI and configuration interfaces:

    RspeedyRsbuild with pluginLynx
    CLIrspeedy dev / build / preview / inspectrsbuild dev / build / preview / inspect
    Configuration filelynx.config.ts, with defineConfig from @lynx-js/rspeedyrsbuild.config.ts, with defineConfig from @rsbuild/core
    Configuration scopeA strictly validated subset of Rsbuild configuration, with some options restrictedThe full Rsbuild configuration and plugin ecosystem
    Lynx-specific optionsSet directly in the configuration file, such as output.filename.bundlePass to pluginLynx({ ... })
    Shorthand configurationsource.entry and output.filename accept stringsUse object form
    Build-time types@lynx-js/rspeedy/client@rsbuild/core/types

    For example, Rspeedy does not pass through options such as tools.postcss, and fixes values such as output.charset and output.polyfill. With Rsbuild, follow the Rsbuild configuration reference directly. See the Lynx build configuration reference for Lynx-specific options and changed defaults.

    Projects continuing to use Rspeedy can refer to its CLI documentation and version upgrade guide.

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.