@lynx-js/rspeedy@0.15.2
Patch Changes
-
Support enabling preact devtools in production via the
REACT_DEVTOOLenvironment variable. (#2880)By default
@lynx-js/preact-devtoolsis aliased away in production builds. Setting theREACT_DEVTOOLenvironment variable now:- keeps a user-imported
@lynx-js/preact-devtoolsfrom being stripped; - defines
__REACT_DEVTOOL__, which gates the dev-only runtime hooks devtools depends on (such asinjectLepusMethods) so they also run in production; - keeps function/class names during minification (
keep_fnames/keep_classnames), which devtools needs to resolve component names (type.name) and to reconstruct the hook tree (it matches minified stack frames by function name).
@lynx-js/react/debugremains development-only. - keeps a user-imported
-
Fix the
webenvironment crashing in development because its main thread was bundled with the Rsbuild web HMR runtime. (#2910)Previously the
webenvironment was compiled withtarget: 'web', which makes Rsbuild inject its own HMR client (@rsbuild/core/dist/client/hmr.js). That client drives__webpack_require__.hmrM, which is implemented withlynx.requireModuleAsync— an API the web main thread does not provide — so hot updates crashed.The
webenvironment now uses the same target and HMR entry as thelynxenvironment, going through Lynx's own HMR runtime instead of the Rsbuild web one. -
Updated dependencies [
7a6577a]:- @lynx-js/debug-metadata-rsbuild-plugin@0.1.2
- @lynx-js/web-rsbuild-server-middleware@0.22.1