@lynx-js/react-rsbuild-plugin-canary 0.11.0-canary-20250919-ec48624b → 0.11.0

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,6 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
- ## 0.11.0-canary-20250919153613-ec48624beeb75f579be8a479e4a772afc59c7a17
3
+ ## 0.11.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -8,16 +8,17 @@
8
8
 
9
9
  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
10
 
11
+ - **BREAKING CHANGE**: Remove the `enableICU` option. ([#1800](https://github.com/lynx-family/lynx-stack/pull/1800))
12
+
11
13
  ### Patch Changes
12
14
 
13
15
  - Be compat with `@lynx-js/react` v0.114.0 ([#1781](https://github.com/lynx-family/lynx-stack/pull/1781))
14
16
 
15
- - 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)]:
16
- - @lynx-js/template-webpack-plugin@0.9.0-canary-20250919153613-ec48624beeb75f579be8a479e4a772afc59c7a17
17
- - @lynx-js/react@0.114.0-canary-20250919153613-ec48624beeb75f579be8a479e4a772afc59c7a17
18
- - @lynx-js/react-webpack-plugin@0.7.1-canary-20250919153613-ec48624beeb75f579be8a479e4a772afc59c7a17
19
- - @lynx-js/css-extract-webpack-plugin@0.6.3-canary-20250919153613-ec48624beeb75f579be8a479e4a772afc59c7a17
20
- - @lynx-js/react-alias-rsbuild-plugin@0.11.0-canary-20250919153613-ec48624beeb75f579be8a479e4a772afc59c7a17
17
+ - 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)]:
18
+ - @lynx-js/template-webpack-plugin@0.9.0
19
+ - @lynx-js/react-webpack-plugin@0.7.1
20
+ - @lynx-js/css-extract-webpack-plugin@0.6.3
21
+ - @lynx-js/react-alias-rsbuild-plugin@0.11.0
21
22
  - @lynx-js/use-sync-external-store@1.5.0
22
23
  - @lynx-js/react-refresh-webpack-plugin@0.3.4
23
24
 
@@ -160,28 +161,28 @@
160
161
 
161
162
  ```ts
162
163
  type InlineChunkTestFunction = (params: {
163
- size: number;
164
- name: string;
165
- }) => boolean;
164
+ size: number
165
+ name: string
166
+ }) => boolean
166
167
 
167
- type InlineChunkTest = RegExp | InlineChunkTestFunction;
168
+ type InlineChunkTest = RegExp | InlineChunkTestFunction
168
169
 
169
170
  type InlineChunkConfig =
170
171
  | boolean
171
172
  | InlineChunkTest
172
- | { enable?: boolean | "auto"; test: InlineChunkTest };
173
+ | { enable?: boolean | 'auto', test: InlineChunkTest }
173
174
  ```
174
175
 
175
176
  ```ts
176
- import { defineConfig } from "@lynx-js/rspeedy";
177
+ import { defineConfig } from '@lynx-js/rspeedy'
177
178
 
178
179
  export default defineConfig({
179
180
  output: {
180
181
  inlineScripts: ({ name, size }) => {
181
- return name.includes("foo") && size < 1000;
182
+ return name.includes('foo') && size < 1000
182
183
  },
183
184
  },
184
- });
185
+ })
185
186
  ```
186
187
 
187
188
  - Updated dependencies [[`51cb73d`](https://github.com/lynx-family/lynx-stack/commit/51cb73dd0b77d35540644cdd2e6c37db856f0e8a), [`69fb042`](https://github.com/lynx-family/lynx-stack/commit/69fb0420e297abf768c889769c95a207c480b3c7), [`a7e8b5b`](https://github.com/lynx-family/lynx-stack/commit/a7e8b5bbbab0490e7cf6f47581130e7b32739abb)]:
@@ -261,13 +262,13 @@
261
262
  example:
262
263
 
263
264
  ```js
264
- import { defineConfig } from "@lynx-js/rspeedy";
265
+ import { defineConfig } from '@lynx-js/rspeedy'
265
266
 
266
267
  export default defineConfig({
267
268
  output: {
268
269
  inlineScripts: false,
269
270
  },
270
- });
271
+ })
271
272
  ```
272
273
 
273
274
  - Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
@@ -354,7 +355,7 @@
354
355
  Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
355
356
 
356
357
  ```js
357
- import { defineConfig } from "@lynx-js/rspeedy";
358
+ import { defineConfig } from '@lynx-js/rspeedy'
358
359
 
359
360
  export default defineConfig({
360
361
  tools: {
@@ -366,7 +367,7 @@
366
367
  },
367
368
  },
368
369
  },
369
- });
370
+ })
370
371
  ```
371
372
 
372
373
  - Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
@@ -542,7 +543,7 @@
542
543
  You may turn it off using `output.minify.css: false`:
543
544
 
544
545
  ```js
545
- import { defineConfig } from "@lynx-js/rspeedy";
546
+ import { defineConfig } from '@lynx-js/rspeedy'
546
547
 
547
548
  export default defineConfig({
548
549
  output: {
@@ -550,18 +551,18 @@
550
551
  css: false,
551
552
  },
552
553
  },
553
- });
554
+ })
554
555
  ```
555
556
 
556
557
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
557
558
 
558
559
  ```js
559
- import { defineConfig } from "@lynx-js/rspeedy";
560
- import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
560
+ import { defineConfig } from '@lynx-js/rspeedy'
561
+ import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
561
562
 
562
563
  export default defineConfig({
563
564
  plugins: [pluginCssMinimizer()],
564
- });
565
+ })
565
566
  ```
566
567
 
567
568
  ### Patch Changes
@@ -641,18 +642,18 @@
641
642
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
642
643
 
643
644
  ```js
644
- import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
645
- import { defineConfig } from "@lynx-js/rspeedy";
645
+ import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
646
+ import { defineConfig } from '@lynx-js/rspeedy'
646
647
 
647
648
  export default defineConfig({
648
649
  plugins: [
649
650
  pluginReactLynx({
650
651
  defineDCE: {
651
- __SOME_FALSE_DEFINE__: "false",
652
+ __SOME_FALSE_DEFINE__: 'false',
652
653
  },
653
654
  }),
654
655
  ],
655
- });
656
+ })
656
657
  ```
657
658
 
658
659
  Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
@@ -660,20 +661,20 @@
660
661
  For example, `import` initialized by dead code will be removed:
661
662
 
662
663
  ```js
663
- import { foo } from "bar";
664
+ import { foo } from 'bar'
664
665
 
665
666
  if (__SOME_FALSE_DEFINE__) {
666
- foo();
667
- console.log("dead code");
667
+ foo()
668
+ console.log('dead code')
668
669
  } else {
669
- console.log("reachable code");
670
+ console.log('reachable code')
670
671
  }
671
672
  ```
672
673
 
673
674
  will be transformed to:
674
675
 
675
676
  ```js
676
- console.log("reachable code");
677
+ console.log('reachable code')
677
678
  ```
678
679
 
679
680
  - Updated dependencies [8dd6cca]
@@ -716,18 +717,18 @@
716
717
  - a30c83d: Add `compat.removeComponentAttrRegex`.
717
718
 
718
719
  ```js
719
- import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
720
- import { defineConfig } from "@lynx-js/rspeedy";
720
+ import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
721
+ import { defineConfig } from '@lynx-js/rspeedy'
721
722
 
722
723
  export default defineConfig({
723
724
  plugins: [
724
725
  pluginReactLynx({
725
726
  compat: {
726
- removeComponentAttrRegex: "YOUR REGEX",
727
+ removeComponentAttrRegex: 'YOUR REGEX',
727
728
  },
728
729
  }),
729
730
  ],
730
- });
731
+ })
731
732
  ```
732
733
 
733
734
  NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
@@ -746,11 +747,11 @@
746
747
 
747
748
  ```javascript
748
749
  // bar.ts
749
- import "background-only";
750
+ import 'background-only'
750
751
 
751
752
  export const bar = () => {
752
- return "bar";
753
- };
753
+ return 'bar'
754
+ }
754
755
  ```
755
756
 
756
757
  If `bar` is called in `main-thread`, build time error will be triggered.
@@ -759,15 +760,15 @@
759
760
 
760
761
  ```tsx
761
762
  // App.tsx
762
- import { bar } from "./bar.js";
763
+ import { bar } from './bar.js'
763
764
 
764
765
  function App() {
765
- bar();
766
+ bar()
766
767
  return (
767
768
  <view>
768
769
  <text>Hello, Lynx x rspeedy</text>
769
770
  </view>
770
- );
771
+ )
771
772
  }
772
773
  ```
773
774
 
package/dist/index.d.ts CHANGED
@@ -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
@@ -284,7 +284,7 @@ const DEFAULT_DIST_PATH_INTERMEDIATE = '.rspeedy';
284
284
  const DEFAULT_FILENAME_HASH = '.[contenthash:8]';
285
285
  const EMPTY_HASH = '';
286
286
  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;
287
+ const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableRemoveCSSScope, firstScreenSyncTiming, enableSSR, removeDescendantSelectorScope, targetSdkVersion, extractStr: originalExtractStr, experimental_isLazyBundle } = options;
288
288
  const { config, logger } = api.useExposed(Symbol.for('rspeedy.api'));
289
289
  api.modifyBundlerChain(async (chain, { environment, isDev, isProd })=>{
290
290
  const entries = chain.entryPoints.entries() ?? {};
@@ -339,7 +339,6 @@ function applyEntry(api, options) {
339
339
  defaultDisplayLinear,
340
340
  enableA11y: true,
341
341
  enableAccessibilityElement,
342
- enableICU,
343
342
  enableCSSInheritance,
344
343
  enableCSSInvalidation,
345
344
  enableCSSSelector,
@@ -607,14 +606,13 @@ function applyUseSyncExternalStore(api) {
607
606
  var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js");
608
607
  var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.2_typescript@5.9.2/node_modules/typia/lib/internal/_assertGuard.js");
609
608
  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)=>{
609
+ 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
610
  if ([
612
611
  "compat",
613
612
  "customCSSInheritanceList",
614
613
  "debugInfoOutside",
615
614
  "defaultDisplayLinear",
616
615
  "enableAccessibilityElement",
617
- "enableICU",
618
616
  "enableCSSInheritance",
619
617
  "enableCSSInvalidation",
620
618
  "enableCSSSelector",
@@ -738,11 +736,6 @@ const validateConfig = (()=>{
738
736
  path: _path + ".enableAccessibilityElement",
739
737
  expected: "(boolean | undefined)",
740
738
  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
739
  }, _errorFactory)) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance || _assertGuard._assertGuard(_exceptionable, {
747
740
  method: "typia.createAssertEquals",
748
741
  path: _path + ".enableCSSInheritance",
@@ -840,7 +833,6 @@ const validateConfig = (()=>{
840
833
  "debugInfoOutside",
841
834
  "defaultDisplayLinear",
842
835
  "enableAccessibilityElement",
843
- "enableICU",
844
836
  "enableCSSInheritance",
845
837
  "enableCSSInvalidation",
846
838
  "enableCSSSelector",
@@ -1177,7 +1169,6 @@ function pluginReactLynx(userOptions) {
1177
1169
  debugInfoOutside: true,
1178
1170
  defaultDisplayLinear: true,
1179
1171
  enableAccessibilityElement: false,
1180
- enableICU: false,
1181
1172
  enableCSSInheritance: false,
1182
1173
  enableCSSInvalidation: true,
1183
1174
  enableCSSSelector: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin-canary",
3
- "version": "0.11.0-canary-20250919-ec48624b",
3
+ "version": "0.11.0",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -32,12 +32,12 @@
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-20250919-ec48624b",
36
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.11.0-canary-20250919-ec48624b",
35
+ "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.3",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.11.0",
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-20250919-ec48624b",
38
+ "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.7.1",
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-20250919-ec48624b",
40
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.9.0",
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
  },
@@ -53,9 +53,9 @@
53
53
  "type-fest": "^4.41.0",
54
54
  "typia": "9.7.2",
55
55
  "typia-rspack-plugin": "2.2.2",
56
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.114.0-canary-20250919-ec48624b",
56
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.114.0",
57
57
  "@lynx-js/react-transform": "0.2.0",
58
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.11.3-canary-20250919-ec48624b",
58
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.11.3",
59
59
  "@lynx-js/vitest-setup": "0.0.0"
60
60
  },
61
61
  "peerDependencies": {