github lynx-family/lynx-stack @lynx-js/rsbuild-plugin@0.1.0

Minor Changes

  • BREAKING CHANGE: Remove dev.client. websocketTransport predates LynxWebSocketModule, the native module Lynx has shipped since 2.16, so HMR always resolves @lynx-js/websocket — the binding to it. (#3684)

  • Add performance to the pluginLynx options, alongside output, and expose it on the config pluginLynx provides. Rspeedy maps its performance.profile onto it, so a plugin can read the option from the build engine instead of requiring Rspeedy to be the caller. pluginReactLynx reads it from there instead of requiring Rspeedy. (#3691)

  • BREAKING CHANGE: Emit the intermediate files into .lynx instead of .rspeedy, since the directory is written by the Lynx build engine rather than by Rspeedy. The directory is no longer configurable: output.distPath.intermediate was documented as never read, and nothing else reads it now either. (#3682)

Patch Changes

  • Do not apply the Lynx build engine again when pluginLynx is registered on an environment rather than globally, which silently replaced the options it was given. (#3695)

  • Enable output.sourceMap.css by default only in Lynx environments, so web builds no longer emit unused CSS .map files into the intermediate directory. (#3747)

  • Accept DEBUG=lynx (and lynx:*, lynx:template) for the Lynx debug output and intermediates. It is the recommended form now that the plugins also run under Rslib and Rsbuild; DEBUG=rspeedy keeps working. (#3735)

  • Honor output.filename.css, output.distPath.css, output.legalComments, output.sourceMap.js and dev.assetPrefix when they are set on an environment. pluginLynx used to read them from the root of the config only and silently replaced a per-environment value with its own default. (#3768)

  • Declare the build host as an optional peer dependency. @rsbuild/core covers a plain Rsbuild build, and @lynx-js/rspeedy covers an Rspeedy one, so whichever host is installed is version-checked. (#3678)

  • Add pluginLynx({ output: { minify } }) for the per-thread minifier options. They are merged on top of the ones Rspeedy tunnels through the Rsbuild config, and the Lynx options take precedence. (#3662)

  • Honor output.distPath.intermediate. The Lynx build engine now resolves the intermediate directory, so the option is no longer ignored by the plugins that emit a Lynx bundle. (#3676)

  • Write the bundle to disk during dev by default. A Lynx client reads it from disk as often as it reads it from the dev server, so the Lynx build engine now carries the default that only Rspeedy used to apply. (#3680)

  • Add pluginLynx({ dev: { client: { websocketTransport } } }) for the module that provides the WebSocket used by HMR. It takes precedence over the one Rspeedy tunnels through the Rsbuild config. (#3663)

  • Stop rspeedy preview from repeating the bundle path in the URLs it prints. The bundle path is now resolved once, in server.printUrls, instead of being written into the server routes that Rsbuild appends to every printed URL. (#3779)

  • The minify options come from pluginLynx now; output.minify only decides whether to minify at all. pluginLynx applies them per environment, so output.minify: true on an environment no longer drops them (part of #3723). (#3731)

  • Apply the Lynx build engine to rslib builds: module resolution, SWC transforms, bundler target, output, minification (JS and CSS), source maps and debug metadata now match an application build. The plugins that load or serve a bundle stay off, since rslib assembles its own. (#3696)

  • pluginReactLynx registers the encoders and the background runtime wrapper for every caller, and WebEncodePlugin routes the custom sections of a bundle without a root into the slots the web runtime reads. @lynx-js/lynx-bundle-rslib-config only sets the template plugin and the main-thread wrapper up now. (#3744)

  • Print the dev and preview server URLs from each environment's own entries and dev.assetPrefix, instead of crossing the root source.entry/dev.assetPrefix with every environment. (#3461)

  • Expose Symbol.for('LynxTemplatePlugin') from pluginLynx instead of from each DSL plugin, so the plugins that tap the template hooks work with the build engine alone. (#3675)

  • Updated dependencies [d716bd9, c21cddd, f743e12, cdceffc, 6da3e18, 754ed35, 5637926, eaefef6, c21cddd, 0be26e9, 32ba734]:

    • @lynx-js/cache-events-webpack-plugin@0.2.1
    • @lynx-js/template-webpack-plugin@0.16.0
    • @lynx-js/debug-metadata-rsbuild-plugin@0.2.2
    • @lynx-js/web-rsbuild-server-middleware@0.26.0
    • @lynx-js/chunk-loading-webpack-plugin@0.4.2

Don't miss a new lynx-stack release

NewReleases is sending notifications on new releases.