@lynx-js/react-rsbuild-plugin-canary 1.0.0-canary-20250918-9c8321cb → 1.0.0-canary-20251204-736b8322

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,97 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
- ## 1.0.0-canary-20250918130325-9c8321cbe6550bb41ecd8321d79ab86b5ac2814b
3
+ ## 1.0.0-canary-20251204053135-736b83223ab042c058e0fbc5040c72316e716f3f
4
+
5
+ ### Minor Changes
6
+
7
+ - **BREAKING CHANGE**: Require `@lynx-js/rspeedy` 0.12.0. ([#1951](https://github.com/lynx-family/lynx-stack/pull/1951))
8
+
9
+ ### Patch Changes
10
+
11
+ - Support Yarn Plug'n'Play. ([#1964](https://github.com/lynx-family/lynx-stack/pull/1964))
12
+
13
+ - Updated dependencies [[`09adc7e`](https://github.com/lynx-family/lynx-stack/commit/09adc7e0c96d8151a45279bb5bf63552645132ad), [`fd233bd`](https://github.com/lynx-family/lynx-stack/commit/fd233bd970d1f64e24e7e809b65c43654a1c7577), [`738d44d`](https://github.com/lynx-family/lynx-stack/commit/738d44d685870d7c3f64a1be7139e8d7af498feb), [`736b832`](https://github.com/lynx-family/lynx-stack/commit/736b83223ab042c058e0fbc5040c72316e716f3f), [`62e816d`](https://github.com/lynx-family/lynx-stack/commit/62e816d68c0c932e9c75af650307292b8c050304), [`5bbb439`](https://github.com/lynx-family/lynx-stack/commit/5bbb43981580f917f59819cd4ff7972b9737a341), [`3692a16`](https://github.com/lynx-family/lynx-stack/commit/3692a169ae443124de0e9f7a288318f5dfba13b0), [`d2e290b`](https://github.com/lynx-family/lynx-stack/commit/d2e290b67971ead5bedbcc1e34dd7f3bf4a6f5f3), [`738d44d`](https://github.com/lynx-family/lynx-stack/commit/738d44d685870d7c3f64a1be7139e8d7af498feb)]:
14
+ - @lynx-js/react@0.115.0-canary-20251204053135-736b83223ab042c058e0fbc5040c72316e716f3f
15
+ - @lynx-js/react-alias-rsbuild-plugin@1.0.0-canary-20251204053135-736b83223ab042c058e0fbc5040c72316e716f3f
16
+ - @lynx-js/css-extract-webpack-plugin@0.6.5-canary-20251204053135-736b83223ab042c058e0fbc5040c72316e716f3f
17
+ - @lynx-js/template-webpack-plugin@0.9.2-canary-20251204053135-736b83223ab042c058e0fbc5040c72316e716f3f
18
+ - @lynx-js/use-sync-external-store@1.5.0
19
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
20
+ - @lynx-js/react-webpack-plugin@0.7.2
21
+
22
+ ## 0.11.4
23
+
24
+ ### Patch Changes
25
+
26
+ - When engineVersion is greater than or equal to 3.1, use `__SetAttribute` to set text attribute for text node instead of creating a raw text node. ([#1880](https://github.com/lynx-family/lynx-stack/pull/1880))
27
+
28
+ - Add `react-compiler-runtime` to `resolve.dedupe`. ([#1269](https://github.com/lynx-family/lynx-stack/pull/1269))
29
+
30
+ With this change you can setup [React Compiler](https://react.dev/learn/react-compiler) for ReactLynx by `pluginBabel`:
31
+
32
+ ```js
33
+ import { defineConfig } from "@lynx-js/rspeedy";
34
+ import { pluginBabel } from "@rsbuild/plugin-babel";
35
+
36
+ export default defineConfig({
37
+ plugins: [
38
+ pluginBabel({
39
+ include: /\.(?:jsx|tsx)$/,
40
+ babelLoaderOptions(opts) {
41
+ opts.plugins?.unshift([
42
+ "babel-plugin-react-compiler",
43
+ // See https://react.dev/reference/react-compiler/configuration for config
44
+ {
45
+ // ReactLynx only supports target to version 17
46
+ target: "17",
47
+ },
48
+ ]);
49
+ },
50
+ }),
51
+ ],
52
+ });
53
+ ```
54
+
55
+ - Updated dependencies [[`e7d186a`](https://github.com/lynx-family/lynx-stack/commit/e7d186a6fcf08fecf18b5ab82b004b955bb1a2b3), [`0d7a4c3`](https://github.com/lynx-family/lynx-stack/commit/0d7a4c3d49d63e30d5f05c372ef99ee5cf2fcadd)]:
56
+ - @lynx-js/react-webpack-plugin@0.7.2
57
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.4
58
+ - @lynx-js/use-sync-external-store@1.5.0
59
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
60
+
61
+ ## 0.11.3
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [[`96545dd`](https://github.com/lynx-family/lynx-stack/commit/96545dd9f966c07aa64437aefc781a9f3e260861)]:
66
+ - @lynx-js/template-webpack-plugin@0.9.1
67
+ - @lynx-js/css-extract-webpack-plugin@0.6.4
68
+ - @lynx-js/react-webpack-plugin@0.7.1
69
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.3
70
+
71
+ ## 0.11.2
72
+
73
+ ### Patch Changes
74
+
75
+ - Fix using wrong version of `@lynx-js/react/refresh`. ([#1756](https://github.com/lynx-family/lynx-stack/pull/1756))
76
+
77
+ - Updated dependencies []:
78
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.2
79
+ - @lynx-js/use-sync-external-store@1.5.0
80
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
81
+ - @lynx-js/react-webpack-plugin@0.7.1
82
+
83
+ ## 0.11.1
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [[`19f823a`](https://github.com/lynx-family/lynx-stack/commit/19f823aae4ce6d99c173d28d157b7514ae8453cf)]:
88
+ - @lynx-js/css-extract-webpack-plugin@0.6.4
89
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.1
90
+ - @lynx-js/use-sync-external-store@1.5.0
91
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4
92
+ - @lynx-js/react-webpack-plugin@0.7.1
93
+
94
+ ## 0.11.0
4
95
 
5
96
  ### Minor Changes
6
97
 
@@ -8,14 +99,17 @@
8
99
 
9
100
  Since the thread element resolution is still in experimental stage and may have stability risks, it will be disabled by default after this change.
10
101
 
102
+ - **BREAKING CHANGE**: Remove the `enableICU` option. ([#1800](https://github.com/lynx-family/lynx-stack/pull/1800))
103
+
11
104
  ### Patch Changes
12
105
 
13
- - Updated dependencies [[`24100ab`](https://github.com/lynx-family/lynx-stack/commit/24100ab63302f8f2bc10578c70ac5cceeffe312a), [`a84376f`](https://github.com/lynx-family/lynx-stack/commit/a84376fcea469cae20c98e4cf824424cf55486e4), [`9c8321c`](https://github.com/lynx-family/lynx-stack/commit/9c8321cbe6550bb41ecd8321d79ab86b5ac2814b), [`24100ab`](https://github.com/lynx-family/lynx-stack/commit/24100ab63302f8f2bc10578c70ac5cceeffe312a), [`8b741a0`](https://github.com/lynx-family/lynx-stack/commit/8b741a09dac5218ad921dbbe2b33d1aaebff6141), [`f09e0aa`](https://github.com/lynx-family/lynx-stack/commit/f09e0aac48d5dd890d8e94c41536d6b721a968d6), [`7f46fdc`](https://github.com/lynx-family/lynx-stack/commit/7f46fdcb53b66adcd0bd74c05fda8eef00fd10e4)]:
14
- - @lynx-js/template-webpack-plugin@0.9.0-canary-20250918130325-9c8321cbe6550bb41ecd8321d79ab86b5ac2814b
15
- - @lynx-js/react@0.114.0-canary-20250918130325-9c8321cbe6550bb41ecd8321d79ab86b5ac2814b
16
- - @lynx-js/react-webpack-plugin@0.7.1-canary-20250918130325-9c8321cbe6550bb41ecd8321d79ab86b5ac2814b
17
- - @lynx-js/css-extract-webpack-plugin@0.6.3-canary-20250918130325-9c8321cbe6550bb41ecd8321d79ab86b5ac2814b
18
- - @lynx-js/react-alias-rsbuild-plugin@1.0.0-canary-20250918130325-9c8321cbe6550bb41ecd8321d79ab86b5ac2814b
106
+ - Be compat with `@lynx-js/react` v0.114.0 ([#1781](https://github.com/lynx-family/lynx-stack/pull/1781))
107
+
108
+ - Updated dependencies [[`24100ab`](https://github.com/lynx-family/lynx-stack/commit/24100ab63302f8f2bc10578c70ac5cceeffe312a), [`24100ab`](https://github.com/lynx-family/lynx-stack/commit/24100ab63302f8f2bc10578c70ac5cceeffe312a), [`d0ef559`](https://github.com/lynx-family/lynx-stack/commit/d0ef559fac383634437880681855923968b4fa65)]:
109
+ - @lynx-js/template-webpack-plugin@0.9.0
110
+ - @lynx-js/react-webpack-plugin@0.7.1
111
+ - @lynx-js/css-extract-webpack-plugin@0.6.3
112
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.0
19
113
  - @lynx-js/use-sync-external-store@1.5.0
20
114
  - @lynx-js/react-refresh-webpack-plugin@0.3.4
21
115
 
package/dist/300.js ADDED
@@ -0,0 +1,34 @@
1
+ export const __webpack_id__ = "300";
2
+ export const __webpack_ids__ = [
3
+ "300"
4
+ ];
5
+ export const __webpack_modules__ = {
6
+ "./src/resolve.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
+ __webpack_require__.d(__webpack_exports__, {
8
+ getImportResolver: ()=>getImportResolver,
9
+ getMainThreadResolver: ()=>getMainThreadResolver
10
+ });
11
+ var node_path__rspack_import_0 = __webpack_require__("node:path");
12
+ var node_url__rspack_import_1 = __webpack_require__("node:url");
13
+ var _lynx_js_react_alias_rsbuild_plugin__rspack_import_2 = __webpack_require__("@lynx-js/react-alias-rsbuild-plugin");
14
+ const __dirname = node_path__rspack_import_0["default"].dirname((0, node_url__rspack_import_1.fileURLToPath)(import.meta.url));
15
+ const getImportResolver = (()=>{
16
+ let resolver = null;
17
+ return (rspack)=>{
18
+ resolver ??= (0, _lynx_js_react_alias_rsbuild_plugin__rspack_import_2.createLazyResolver)(rspack, __dirname, [
19
+ 'import'
20
+ ]);
21
+ return resolver;
22
+ };
23
+ })();
24
+ const getMainThreadResolver = (()=>{
25
+ let resolver = null;
26
+ return (rspack)=>{
27
+ resolver ??= (0, _lynx_js_react_alias_rsbuild_plugin__rspack_import_2.createLazyResolver)(rspack, __dirname, [
28
+ 'lepus'
29
+ ]);
30
+ return resolver;
31
+ };
32
+ })();
33
+ }
34
+ };
package/dist/index.d.ts CHANGED
@@ -441,7 +441,7 @@ export declare interface PluginReactLynxOptions {
441
441
  *
442
442
  * These options should only be used for migrating from ReactLynx2.0.
443
443
  */
444
- compat?: (Partial<CompatVisitorConfig> & {
444
+ compat?: Partial<CompatVisitorConfig> & {
445
445
  /**
446
446
  * Whether disable runtime warnings about using ReactLynx2.0-incompatible `SelectorQuery` APIs.
447
447
  *
@@ -458,7 +458,7 @@ export declare interface PluginReactLynxOptions {
458
458
  * @defaultValue `false`
459
459
  */
460
460
  disableCreateSelectorQueryIncompatibleWarning?: boolean;
461
- }) | undefined;
461
+ } | undefined;
462
462
  /**
463
463
  * When {@link PluginReactLynxOptions.enableCSSInheritance} is enabled, `customCSSInheritanceList` can control which properties are inheritable, not just the default ones.
464
464
  *
@@ -501,14 +501,6 @@ export declare interface PluginReactLynxOptions {
501
501
  * enableAccessibilityElement set the default value of `accessibility-element` for all `<view />` elements.
502
502
  */
503
503
  enableAccessibilityElement?: boolean;
504
- /**
505
- * enableICU enables the Intl API to be enabled globally.
506
- *
507
- * If enabled, please double check the compatibility with Lynx Share Context feature to avoid using shared Intl API from other destroyed card.
508
- *
509
- * @defaultValue `false`
510
- */
511
- enableICU?: boolean;
512
504
  /**
513
505
  * enableCSSInheritance enables the default inheritance properties.
514
506
  *
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_react_alias_rsbuild_plugin_2a0391db__ from "@lynx-js/react-alias-rsbuild-plugin";
2
- import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
3
- import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
1
+ import * as __rspack_external__lynx_js_react_alias_rsbuild_plugin_2a0391db from "@lynx-js/react-alias-rsbuild-plugin";
2
+ import * as __rspack_external_node_path_c5b9b54f from "node:path";
3
+ import * as __rspack_external_node_url_e96de089 from "node:url";
4
4
  import { createRequire } from "node:module";
5
5
  import { LAYERS, ReactWebpackPlugin } from "@lynx-js/react-webpack-plugin";
6
6
  import { RuntimeWrapperWebpackPlugin } from "@lynx-js/runtime-wrapper-webpack-plugin";
7
7
  import { LynxEncodePlugin, LynxTemplatePlugin, WebEncodePlugin } from "@lynx-js/template-webpack-plugin";
8
8
  import { ReactRefreshRspackPlugin, ReactRefreshWebpackPlugin } from "@lynx-js/react-refresh-webpack-plugin";
9
9
  var __webpack_modules__ = {
10
- "../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js": function(__unused_webpack_module, exports) {
10
+ "../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/internal/_accessExpressionAsString.js": function(__unused_webpack_module, exports) {
11
11
  exports._accessExpressionAsString = void 0;
12
12
  const _accessExpressionAsString = (str)=>variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;
13
13
  exports._accessExpressionAsString = _accessExpressionAsString;
@@ -52,9 +52,9 @@ var __webpack_modules__ = {
52
52
  "with"
53
53
  ]);
54
54
  },
55
- "../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_assertGuard.js": function(__unused_webpack_module, exports, __webpack_require__) {
55
+ "../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/internal/_assertGuard.js": function(__unused_webpack_module, exports, __webpack_require__) {
56
56
  exports._assertGuard = void 0;
57
- const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/TypeGuardError.mjs");
57
+ const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/TypeGuardError.mjs");
58
58
  const _assertGuard = (exceptionable, props, factory)=>{
59
59
  if (true === exceptionable) if (factory) throw factory(props);
60
60
  else throw new TypeGuardError_1.TypeGuardError(props);
@@ -63,15 +63,15 @@ var __webpack_modules__ = {
63
63
  exports._assertGuard = _assertGuard;
64
64
  },
65
65
  "@lynx-js/react-alias-rsbuild-plugin": function(module) {
66
- module.exports = __WEBPACK_EXTERNAL_MODULE__lynx_js_react_alias_rsbuild_plugin_2a0391db__;
66
+ module.exports = __rspack_external__lynx_js_react_alias_rsbuild_plugin_2a0391db;
67
67
  },
68
68
  "node:path": function(module) {
69
- module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
69
+ module.exports = __rspack_external_node_path_c5b9b54f;
70
70
  },
71
71
  "node:url": function(module) {
72
- module.exports = __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__;
72
+ module.exports = __rspack_external_node_url_e96de089;
73
73
  },
74
- "../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/TypeGuardError.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
74
+ "../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/TypeGuardError.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
75
75
  __webpack_require__.r(__webpack_exports__);
76
76
  __webpack_require__.d(__webpack_exports__, {
77
77
  TypeGuardError: ()=>TypeGuardError
@@ -187,9 +187,11 @@ const DETECT_IMPORT_ERROR = 'react:detect-import-error';
187
187
  const ALIAS_BACKGROUND_ONLY_MAIN = 'react:alias-background-only-main';
188
188
  const ALIAS_BACKGROUND_ONLY_BACKGROUND = 'react:alias-background-only-background';
189
189
  function applyBackgroundOnly(api) {
190
- api.modifyBundlerChain(async (chain)=>{
190
+ api.modifyBundlerChain(async (chain, { rspack })=>{
191
191
  const __dirname = external_node_path_["default"].dirname((0, external_node_url_.fileURLToPath)(import.meta.url));
192
- const { resolve, resolveMainThread } = await __webpack_require__.e("856").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
192
+ const { getImportResolver, getMainThreadResolver } = await __webpack_require__.e("300").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
193
+ const resolve = getImportResolver(rspack);
194
+ const resolveMainThread = getMainThreadResolver(rspack);
193
195
  const [backgroundOnly, backgroundOnlyMainThread] = await Promise.all([
194
196
  resolve('background-only'),
195
197
  resolveMainThread('background-only')
@@ -284,7 +286,7 @@ const DEFAULT_DIST_PATH_INTERMEDIATE = '.rspeedy';
284
286
  const DEFAULT_FILENAME_HASH = '.[contenthash:8]';
285
287
  const EMPTY_HASH = '';
286
288
  function applyEntry(api, options) {
287
- const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableICU, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableRemoveCSSScope, firstScreenSyncTiming, enableSSR, removeDescendantSelectorScope, targetSdkVersion, extractStr: originalExtractStr, experimental_isLazyBundle } = options;
289
+ const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableRemoveCSSScope, firstScreenSyncTiming, enableSSR, removeDescendantSelectorScope, targetSdkVersion, extractStr: originalExtractStr, experimental_isLazyBundle } = options;
288
290
  const { config, logger } = api.useExposed(Symbol.for('rspeedy.api'));
289
291
  api.modifyBundlerChain(async (chain, { environment, isDev, isProd })=>{
290
292
  const entries = chain.entryPoints.entries() ?? {};
@@ -339,7 +341,6 @@ function applyEntry(api, options) {
339
341
  defaultDisplayLinear,
340
342
  enableA11y: true,
341
343
  enableAccessibilityElement,
342
- enableICU,
343
344
  enableCSSInheritance,
344
345
  enableCSSInvalidation,
345
346
  enableCSSSelector,
@@ -470,13 +471,8 @@ function applyLazy(api) {
470
471
  });
471
472
  }
472
473
  function applyLoaders(api, options) {
473
- const { compat, enableRemoveCSSScope, shake, defineDCE, experimental_isLazyBundle } = options;
474
+ const { compat, enableRemoveCSSScope, shake, defineDCE, engineVersion, experimental_isLazyBundle } = options;
474
475
  api.modifyBundlerChain((chain, { CHAIN_ID })=>{
475
- const experiments = chain.get('experiments');
476
- chain.experiments({
477
- ...experiments,
478
- layers: true
479
- });
480
476
  const rule = chain.module.rules.get(CHAIN_ID.RULE.JS);
481
477
  const uses = rule.uses.entries() ?? {};
482
478
  const { output } = api.getRsbuildConfig();
@@ -487,7 +483,8 @@ function applyLoaders(api, options) {
487
483
  enableRemoveCSSScope,
488
484
  isDynamicComponent: experimental_isLazyBundle,
489
485
  inlineSourcesContent,
490
- defineDCE
486
+ defineDCE,
487
+ engineVersion
491
488
  }).end();
492
489
  const mainThreadRule = rule.oneOf(LAYERS.MAIN_THREAD);
493
490
  mainThreadRule.issuerLayer(LAYERS.MAIN_THREAD).uses.merge(uses).end().when(void 0 !== uses[CHAIN_ID.USE.SWC], (rule)=>{
@@ -506,6 +503,7 @@ function applyLoaders(api, options) {
506
503
  enableRemoveCSSScope,
507
504
  inlineSourcesContent,
508
505
  isDynamicComponent: experimental_isLazyBundle,
506
+ engineVersion,
509
507
  shake,
510
508
  defineDCE
511
509
  }).end();
@@ -513,20 +511,30 @@ function applyLoaders(api, options) {
513
511
  });
514
512
  }
515
513
  const PLUGIN_NAME_REACT_REFRESH = 'lynx:react:refresh';
516
- const refresh_require = createRequire(import.meta.url);
517
514
  function applyRefresh(api) {
518
- api.modifyWebpackChain((chain, { CHAIN_ID, isProd })=>{
519
- if (!isProd) applyRefreshRules(chain, CHAIN_ID, ReactRefreshWebpackPlugin);
515
+ api.modifyWebpackChain(async (chain, { CHAIN_ID, isProd })=>{
516
+ if (!isProd) await applyRefreshRules(api, chain, CHAIN_ID, ReactRefreshWebpackPlugin);
520
517
  });
521
- api.modifyBundlerChain((chain, { isProd, CHAIN_ID })=>{
518
+ api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID })=>{
522
519
  if (!isProd) {
523
- applyRefreshRules(chain, CHAIN_ID, ReactRefreshRspackPlugin);
524
- chain.resolve.alias.set('@lynx-js/react/refresh$', refresh_require.resolve('@lynx-js/react/refresh')).end();
520
+ const { resolve } = api.useExposed(Symbol.for('@lynx-js/react/internal:resolve'));
521
+ await Promise.all([
522
+ applyRefreshRules(api, chain, CHAIN_ID, ReactRefreshRspackPlugin),
523
+ resolve('@lynx-js/react/refresh').then((refresh)=>{
524
+ chain.resolve.alias.set('@lynx-js/react/refresh$', refresh);
525
+ })
526
+ ]);
525
527
  }
526
528
  });
527
529
  }
528
- function applyRefreshRules(chain, CHAIN_ID, ReactRefreshPlugin) {
529
- chain.plugin(PLUGIN_NAME_REACT_REFRESH).before(CHAIN_ID.PLUGIN.HMR).use(ReactRefreshPlugin).end().module.rule('react:refresh').issuerLayer(LAYERS.BACKGROUND).before(CHAIN_ID.RULE.JS).test(/\.[jt]sx$/).exclude.add(/node_modules/).add(external_node_path_["default"].dirname(refresh_require.resolve('@lynx-js/react/package.json'))).add(external_node_path_["default"].dirname(refresh_require.resolve('@lynx-js/react/refresh'))).add(external_node_path_["default"].dirname(refresh_require.resolve('@lynx-js/react/worklet-runtime'))).add(ReactRefreshPlugin.loader).end().use('ReactRefresh').loader(ReactRefreshPlugin.loader).options({}).end().end().end().end();
530
+ async function applyRefreshRules(api, chain, CHAIN_ID, ReactRefreshPlugin) {
531
+ const { resolve } = api.useExposed(Symbol.for('@lynx-js/react/internal:resolve'));
532
+ const [reactRuntime, refresh, workletRuntime] = await Promise.all([
533
+ resolve('@lynx-js/react/package.json'),
534
+ resolve('@lynx-js/react/refresh'),
535
+ resolve('@lynx-js/react/worklet-runtime')
536
+ ]);
537
+ chain.plugin(PLUGIN_NAME_REACT_REFRESH).before(CHAIN_ID.PLUGIN.HMR).use(ReactRefreshPlugin).end().module.rule('react:refresh').issuerLayer(LAYERS.BACKGROUND).before(CHAIN_ID.RULE.JS).test(/\.[jt]sx$/).exclude.add(/node_modules/).add(external_node_path_["default"].dirname(reactRuntime)).add(external_node_path_["default"].dirname(refresh)).add(external_node_path_["default"].dirname(workletRuntime)).add(ReactRefreshPlugin.loader).end().use('ReactRefresh').loader(ReactRefreshPlugin.loader).options({}).end().end().end().end();
530
538
  }
531
539
  const isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Object]' === Object.prototype.toString.call(obj);
532
540
  const applySplitChunksRule = (api)=>{
@@ -591,8 +599,9 @@ function applySWC(api) {
591
599
  }, config));
592
600
  }
593
601
  function applyUseSyncExternalStore(api) {
594
- api.modifyBundlerChain(async (chain)=>{
595
- const { resolve } = await __webpack_require__.e("856").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
602
+ api.modifyBundlerChain(async (chain, { rspack })=>{
603
+ const { getImportResolver } = await __webpack_require__.e("300").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
604
+ const resolve = getImportResolver(rspack);
596
605
  const useSyncExternalStoreEntries = [
597
606
  'use-sync-external-store',
598
607
  'use-sync-external-store/with-selector',
@@ -604,17 +613,16 @@ function applyUseSyncExternalStore(api) {
604
613
  })));
605
614
  });
606
615
  }
607
- var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js");
608
- var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_assertGuard.js");
616
+ var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/internal/_accessExpressionAsString.js");
617
+ var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.3/node_modules/typia/lib/internal/_assertGuard.js");
609
618
  const validateConfig = (()=>{
610
- const _io0 = (input, _exceptionable = true)=>(void 0 === input.compat || "object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) && _io1(input.compat, _exceptionable)) && (void 0 === input.customCSSInheritanceList || Array.isArray(input.customCSSInheritanceList) && input.customCSSInheritanceList.every((elem, _index1)=>"string" == typeof elem)) && (void 0 === input.debugInfoOutside || "boolean" == typeof input.debugInfoOutside) && (void 0 === input.defaultDisplayLinear || "boolean" == typeof input.defaultDisplayLinear) && (void 0 === input.enableAccessibilityElement || "boolean" == typeof input.enableAccessibilityElement) && (void 0 === input.enableICU || "boolean" == typeof input.enableICU) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance) && (void 0 === input.enableCSSInvalidation || "boolean" == typeof input.enableCSSInvalidation) && (void 0 === input.enableCSSSelector || "boolean" == typeof input.enableCSSSelector) && (void 0 === input.enableNewGesture || "boolean" == typeof input.enableNewGesture) && (void 0 === input.enableRemoveCSSScope || "boolean" == typeof input.enableRemoveCSSScope) && (void 0 === input.firstScreenSyncTiming || "immediately" === input.firstScreenSyncTiming || "jsReady" === input.firstScreenSyncTiming) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR) && (void 0 === input.removeDescendantSelectorScope || "boolean" == typeof input.removeDescendantSelectorScope) && (void 0 === input.shake || "object" == typeof input.shake && null !== input.shake && false === Array.isArray(input.shake) && _io4(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io5(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io7(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
619
+ const _io0 = (input, _exceptionable = true)=>(void 0 === input.compat || "object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) && _io1(input.compat, _exceptionable)) && (void 0 === input.customCSSInheritanceList || Array.isArray(input.customCSSInheritanceList) && input.customCSSInheritanceList.every((elem, _index1)=>"string" == typeof elem)) && (void 0 === input.debugInfoOutside || "boolean" == typeof input.debugInfoOutside) && (void 0 === input.defaultDisplayLinear || "boolean" == typeof input.defaultDisplayLinear) && (void 0 === input.enableAccessibilityElement || "boolean" == typeof input.enableAccessibilityElement) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance) && (void 0 === input.enableCSSInvalidation || "boolean" == typeof input.enableCSSInvalidation) && (void 0 === input.enableCSSSelector || "boolean" == typeof input.enableCSSSelector) && (void 0 === input.enableNewGesture || "boolean" == typeof input.enableNewGesture) && (void 0 === input.enableRemoveCSSScope || "boolean" == typeof input.enableRemoveCSSScope) && (void 0 === input.firstScreenSyncTiming || "immediately" === input.firstScreenSyncTiming || "jsReady" === input.firstScreenSyncTiming) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR) && (void 0 === input.removeDescendantSelectorScope || "boolean" == typeof input.removeDescendantSelectorScope) && (void 0 === input.shake || "object" == typeof input.shake && null !== input.shake && false === Array.isArray(input.shake) && _io4(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io5(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io7(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
611
620
  if ([
612
621
  "compat",
613
622
  "customCSSInheritanceList",
614
623
  "debugInfoOutside",
615
624
  "defaultDisplayLinear",
616
625
  "enableAccessibilityElement",
617
- "enableICU",
618
626
  "enableCSSInheritance",
619
627
  "enableCSSInvalidation",
620
628
  "enableCSSSelector",
@@ -738,11 +746,6 @@ const validateConfig = (()=>{
738
746
  path: _path + ".enableAccessibilityElement",
739
747
  expected: "(boolean | undefined)",
740
748
  value: input.enableAccessibilityElement
741
- }, _errorFactory)) && (void 0 === input.enableICU || "boolean" == typeof input.enableICU || _assertGuard._assertGuard(_exceptionable, {
742
- method: "typia.createAssertEquals",
743
- path: _path + ".enableICU",
744
- expected: "(boolean | undefined)",
745
- value: input.enableICU
746
749
  }, _errorFactory)) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance || _assertGuard._assertGuard(_exceptionable, {
747
750
  method: "typia.createAssertEquals",
748
751
  path: _path + ".enableCSSInheritance",
@@ -840,7 +843,6 @@ const validateConfig = (()=>{
840
843
  "debugInfoOutside",
841
844
  "defaultDisplayLinear",
842
845
  "enableAccessibilityElement",
843
- "enableICU",
844
846
  "enableCSSInheritance",
845
847
  "enableCSSInvalidation",
846
848
  "enableCSSSelector",
@@ -1177,7 +1179,6 @@ function pluginReactLynx(userOptions) {
1177
1179
  debugInfoOutside: true,
1178
1180
  defaultDisplayLinear: true,
1179
1181
  enableAccessibilityElement: false,
1180
- enableICU: false,
1181
1182
  enableCSSInheritance: false,
1182
1183
  enableCSSInvalidation: true,
1183
1184
  enableCSSSelector: true,
@@ -1226,11 +1227,6 @@ function pluginReactLynx(userOptions) {
1226
1227
  ]
1227
1228
  }
1228
1229
  });
1229
- if (void 0 === userConfig.output?.inlineScripts) config = mergeRsbuildConfig(config, {
1230
- output: {
1231
- inlineScripts: true
1232
- }
1233
- });
1234
1230
  config = mergeRsbuildConfig({
1235
1231
  tools: {
1236
1232
  rspack: {
@@ -1240,6 +1236,13 @@ function pluginReactLynx(userOptions) {
1240
1236
  }
1241
1237
  }
1242
1238
  }, config);
1239
+ config = mergeRsbuildConfig({
1240
+ resolve: {
1241
+ dedupe: [
1242
+ 'react-compiler-runtime'
1243
+ ]
1244
+ }
1245
+ }, config);
1243
1246
  return config;
1244
1247
  });
1245
1248
  if (resolvedOptions.experimental_isLazyBundle) applyLazy(api);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin-canary",
3
- "version": "1.0.0-canary-20250918-9c8321cb",
3
+ "version": "1.0.0-canary-20251204-736b8322",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -32,31 +32,32 @@
32
32
  "README.md"
33
33
  ],
34
34
  "dependencies": {
35
- "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.3-canary-20250918-9c8321cb",
36
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@1.0.0-canary-20250918-9c8321cb",
35
+ "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.5-canary-20251204-736b8322",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@1.0.0-canary-20251204-736b8322",
37
37
  "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.4",
38
- "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.7.1-canary-20250918-9c8321cb",
38
+ "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.7.2",
39
39
  "@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.3",
40
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.9.0-canary-20250918-9c8321cb",
40
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.9.2-canary-20251204-736b8322",
41
41
  "@lynx-js/use-sync-external-store": "npm:@lynx-js/use-sync-external-store-canary@1.5.0",
42
42
  "background-only": "npm:background-only-canary@0.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@microsoft/api-extractor": "7.52.11",
45
+ "@microsoft/api-extractor": "7.52.15",
46
46
  "@rollup/plugin-typescript": "^12.1.4",
47
- "@rsbuild/core": "1.5.4",
47
+ "@rsbuild/core": "1.6.9",
48
48
  "@rsbuild/plugin-sass": "1.4.0",
49
- "@rsbuild/plugin-typed-css-modules": "1.1.0",
49
+ "@rsbuild/plugin-typed-css-modules": "1.1.1",
50
50
  "rsbuild-plugin-arethetypeswrong": "0.1.1",
51
51
  "rsbuild-plugin-publint": "0.3.3",
52
+ "source-map": "^0.7.6",
52
53
  "tailwindcss": "^3.4.17",
53
- "type-fest": "^4.41.0",
54
+ "type-fest": "^5.0.1",
54
55
  "typia": "9.7.2",
55
56
  "typia-rspack-plugin": "2.2.2",
56
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.114.0-canary-20250918-9c8321cb",
57
- "@lynx-js/react-transform": "0.2.0",
58
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.11.3-canary-20250918-9c8321cb",
59
- "@lynx-js/vitest-setup": "0.0.0"
57
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.115.0-canary-20251204-736b8322",
58
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.12.1-canary-20251204-736b8322",
59
+ "@lynx-js/vitest-setup": "0.0.0",
60
+ "@lynx-js/react-transform": "0.2.0"
60
61
  },
61
62
  "peerDependencies": {
62
63
  "@lynx-js/react": "*"
package/dist/856.js DELETED
@@ -1,22 +0,0 @@
1
- export const __webpack_id__ = "856";
2
- export const __webpack_ids__ = [
3
- "856"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/resolve.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- resolve: ()=>resolve,
9
- resolveMainThread: ()=>resolveMainThread
10
- });
11
- var node_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("node:path");
12
- var node_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("node:url");
13
- var _lynx_js_react_alias_rsbuild_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("@lynx-js/react-alias-rsbuild-plugin");
14
- const __dirname = node_path__WEBPACK_IMPORTED_MODULE_0__["default"].dirname((0, node_url__WEBPACK_IMPORTED_MODULE_1__.fileURLToPath)(import.meta.url));
15
- const resolve = (0, _lynx_js_react_alias_rsbuild_plugin__WEBPACK_IMPORTED_MODULE_2__.createLazyResolver)(__dirname, [
16
- 'import'
17
- ]);
18
- const resolveMainThread = (0, _lynx_js_react_alias_rsbuild_plugin__WEBPACK_IMPORTED_MODULE_2__.createLazyResolver)(__dirname, [
19
- 'lepus'
20
- ]);
21
- }
22
- };