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:
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.