@lynx-js/lynx-bundle-rslib-config@0.6.0
Minor Changes
-
Keep JsBytecode debug info (per-function
pc2linetables) out of external bundles, significantly reducing the size of bytecode-encoded main thread chunks. (#2955) -
Add an
enableJsBytecodeoption to control compiling main thread chunks to JsBytecode. Defaults tofalsewhenNODE_ENVis'development',trueotherwise. (#2954) -
Support async externals in
defineExternalBundleRslibConfig. An external can now use the object form{ libraryName, async: true }to emit apromiseexternal, so importing modules await the library namespace mounted as a Promise by the host application and pick subpath segments after it resolves. (#2928)The output library type also switches from Rslib's default
commonjs-statictocommonjs2, so an async entry exports its namespace Promise as a whole instead of a static per-name copy that would readundefined. A sync entry exports the same namespace object as before. -
output.externalsPresetsentries accept the{ async: true }object form, so a produced external bundle awaits its ReactLynx externals (thepromiseexternal) before reading a subpath — required on web. External bundle builds also flag their react loaders asisExternalBundleso ReactLynx snapshots use the__Card__entry name. (#2934)
Patch Changes
-
Support enabling preact devtools for external bundles via the
REACT_DEVTOOLenvironment variable. (#2980)When
REACT_DEVTOOLis set,defineExternalBundleRslibConfignow keeps function and class names during minification (keep_fnames/keep_classnameson bothcompressandmangle), which devtools needs to resolve component names (type.name) and to reconstruct the hook tree (it matches minified stack frames by function name). The default output is unchanged whenREACT_DEVTOOLis unset. This mirrorspluginMinifyin@lynx-js/rspeedy(#2880). -
Updated dependencies [
60cb231]:- @lynx-js/web-core@0.22.2
- @lynx-js/runtime-wrapper-webpack-plugin@0.2.2