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

5 hours ago

Minor Changes

  • BREAKING CHANGE: Require @lynx-js/rspeedy ^0.17.0 in the plugins that read the build engine config through Symbol.for('@lynx-js/rsbuild-plugin:config'), since the engine that ships with 0.16 does not expose it. The plugins that do not touch the engine keep their existing range and add ^0.17.0 to it. (#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)

  • Move runtime attribute-name configuration to the page-scoped lynx object and (#3718)
    inject it from the host compilation through a standalone webpack plugin. Lazy
    and external bundles reuse the host-injected configuration without applying
    the plugin themselves. The runtime-config webpack plugin is published through
    its own DSL-neutral package entry and accepts arbitrary runtime configuration
    keys without depending on ReactLynx. The merged top-level configuration is
    shallow-frozen to prevent accidental mutation after host initialization.

  • 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 splitChunks, performance.chunkSplit and output.sourceMap when they are set on an environment. pluginReactLynx used to read them from the root of the config only when deciding whether to split chunks and whether to inline sources into source maps. (#3768)

  • Skip the background runtime wrapper on any asset marked lynx:main-thread instead of matching filenames, and mark the main-thread assets of an external bundle by the layer of their modules, so a main-thread entry an external bundle names itself is no longer wrapped. (#3751)

  • 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 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)

  • 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)

  • Accept @lynx-js/react 0.126, which ships Preact 11. (#3450)

  • 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)

  • 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)

  • Skip the built-in pluginLynx when one is already applied, so a user who needs to configure the Lynx build engine can apply pluginLynx themselves and have their options win. @lynx-js/rspeedy becomes an optional peer dependency of pluginReactLynx and pluginQRCode. (#3661)

  • Updated dependencies [643a52d, 76126fc, b854dec, c21cddd, f743e12, 9bbfe5d, 5637926, cdceffc, 6da3e18, 754ed35, 5637926, ab041b7, 0a52438, c6f971a, 0c47383, b3c6045, 08a36e3, abab087, 32ba734, 7850e1e, 3ab5ba3, eaefef6, e2ac811, 0be26e9, 3d63331, 32ba734]:

    • @lynx-js/rsbuild-plugin@0.1.0
    • @lynx-js/react-webpack-plugin@0.11.2
    • @lynx-js/runtime-config-webpack-plugin@0.0.1
    • @lynx-js/template-webpack-plugin@0.16.0
    • @lynx-js/runtime-wrapper-webpack-plugin@0.2.4
    • @lynx-js/react-alias-rsbuild-plugin@0.20.0
    • @lynx-js/css-extract-webpack-plugin@0.11.0
    • @lynx-js/use-sync-external-store@1.5.0
    • @lynx-js/react-refresh-webpack-plugin@0.4.2

Don't miss a new lynx-stack release

NewReleases is sending notifications on new releases.