@lynx-js/react-canary 0.115.0-canary-20251205-6400f87b → 0.115.1-canary-20251208-a01fa58b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # @lynx-js/react
2
2
 
3
- ## 0.115.0-canary-20251205074811-6400f87b9b0370e5fe53ce37711d45932fede695
3
+ ## 0.115.1-canary-20251208100710-a01fa58b9801a6f163a067063ab448fc4fb0ea5a
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto define lynx.loadLazyBundle when using `import(/* relative path */)`. ([#1956](https://github.com/lynx-family/lynx-stack/pull/1956))
8
+
9
+ ## 0.115.0
4
10
 
5
11
  ### Minor Changes
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-canary",
3
- "version": "0.115.0-canary-20251205-6400f87b",
3
+ "version": "0.115.1-canary-20251208-a01fa58b",
4
4
  "description": "ReactLynx is a framework for developing Lynx applications with familiar React.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -5,7 +5,7 @@
5
5
  Rslib v0.15.0
6
6
 
7
7
  info build started...
8
- ready built in 0.10 s
8
+ ready built in 0.31 s
9
9
 
10
10
  File (esm) Size 
11
11
  dist/index.js 10.1 kB
@@ -1,10 +1,9 @@
1
1
  import './lynx.js';
2
2
  import './lynx/component.js';
3
- import { Children, Fragment, cloneElement, createElement, createRef, forwardRef, isValidElement, memo, useSyncExternalStore } from 'preact/compat';
3
+ import { Children, Fragment, cloneElement, createElement, createRef, forwardRef, isValidElement, lazy, memo, useSyncExternalStore } from 'preact/compat';
4
4
  import { Suspense } from './lynx/suspense.js';
5
5
  export { Component, createContext } from 'preact';
6
6
  export { PureComponent } from 'preact/compat';
7
7
  export * from './hooks/react.js';
8
- declare const lazy: typeof import('preact/compat').lazy;
9
8
  export { Children, createRef, Fragment, isValidElement, memo, forwardRef, Suspense, lazy, createElement, cloneElement, useSyncExternalStore, };
10
9
  export * from './lynx-api.js';
@@ -3,17 +3,12 @@
3
3
  // LICENSE file in the root directory of this source tree.
4
4
  import './lynx.js';
5
5
  import './lynx/component.js';
6
- import { Children, Component, Fragment, PureComponent, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, memo, lazy as preactLazy, useSyncExternalStore, } from 'preact/compat';
6
+ import { Children, Component, Fragment, PureComponent, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, lazy, memo, useSyncExternalStore, } from 'preact/compat';
7
7
  import { useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, } from './hooks/react.js';
8
- import { loadLazyBundle } from './lynx/lazy-bundle.js';
9
8
  import { Suspense } from './lynx/suspense.js';
10
9
  export { Component, createContext } from 'preact';
11
10
  export { PureComponent } from 'preact/compat';
12
11
  export * from './hooks/react.js';
13
- const lazy = /*#__PURE__*/ (() => {
14
- lynx.loadLazyBundle = loadLazyBundle;
15
- return preactLazy;
16
- })();
17
12
  /**
18
13
  * @internal
19
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,WAAW,CAAC;AACnB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,UAAU,EACV,cAAc,EACd,IAAI,EACJ,IAAI,IAAI,UAAU,EAClB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,UAAU,EACV,MAAM,EACN,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,uB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a,EACb,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,UAAU,EACV,MAAM,EACN,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,cAAc,kBAAkB,CAAC;AAEjC;;GAEG;AACH,eAAe;IACb,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,SAAS;IACT,eAAe;IACf,MAAM;IACN,mBAAmB;IACnB,OAAO;IACP,WAAW;IACX,UAAU;IACV,aAAa;IACb,oBAAoB;IAEpB,aAAa;IACb,SAAS;IACT,QAAQ;IACR,cAAc;IACd,QAAQ;IACR,SAAS;IACT,aAAa;IACb,IAAI;IACJ,UAAU;IACV,QAAQ;IACR,IAAI;IACJ,aAAa;CACd,CAAC;AAEF,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,cAAc,EACd,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,oBAAoB,GACrB,CAAC;AAEF,cAAc,eAAe,CAAC"}
@@ -192,6 +192,11 @@ const createVitestConfig = async (options)=>{
192
192
  target: 'MIXED'
193
193
  },
194
194
  engineVersion: options?.engineVersion ?? '',
195
+ dynamicImport: {
196
+ injectLazyBundle: false,
197
+ layer: 'test',
198
+ runtimePkg: `${runtimePkgName}/internal`
199
+ },
195
200
  directiveDCE: false,
196
201
  defineDCE: false,
197
202
  shake: false,