@lynx-js/react-rsbuild-plugin-canary 0.11.0-canary-20250921-d0ef559f → 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.
Files changed (2) hide show
  1. package/CHANGELOG.md +42 -43
  2. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
- ## 0.11.0-canary-20250921062143-d0ef559fac383634437880681855923968b4fa65
3
+ ## 0.11.0
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -14,12 +14,11 @@
14
14
 
15
15
  - Be compat with `@lynx-js/react` v0.114.0 ([#1781](https://github.com/lynx-family/lynx-stack/pull/1781))
16
16
 
17
- - 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), [`d0ef559`](https://github.com/lynx-family/lynx-stack/commit/d0ef559fac383634437880681855923968b4fa65), [`f09e0aa`](https://github.com/lynx-family/lynx-stack/commit/f09e0aac48d5dd890d8e94c41536d6b721a968d6), [`7f46fdc`](https://github.com/lynx-family/lynx-stack/commit/7f46fdcb53b66adcd0bd74c05fda8eef00fd10e4)]:
18
- - @lynx-js/template-webpack-plugin@0.9.0-canary-20250921062143-d0ef559fac383634437880681855923968b4fa65
19
- - @lynx-js/react@0.114.0-canary-20250921062143-d0ef559fac383634437880681855923968b4fa65
20
- - @lynx-js/react-webpack-plugin@0.7.1-canary-20250921062143-d0ef559fac383634437880681855923968b4fa65
21
- - @lynx-js/css-extract-webpack-plugin@0.6.3-canary-20250921062143-d0ef559fac383634437880681855923968b4fa65
22
- - @lynx-js/react-alias-rsbuild-plugin@0.11.0-canary-20250921062143-d0ef559fac383634437880681855923968b4fa65
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
23
22
  - @lynx-js/use-sync-external-store@1.5.0
24
23
  - @lynx-js/react-refresh-webpack-plugin@0.3.4
25
24
 
@@ -162,28 +161,28 @@
162
161
 
163
162
  ```ts
164
163
  type InlineChunkTestFunction = (params: {
165
- size: number;
166
- name: string;
167
- }) => boolean;
164
+ size: number
165
+ name: string
166
+ }) => boolean
168
167
 
169
- type InlineChunkTest = RegExp | InlineChunkTestFunction;
168
+ type InlineChunkTest = RegExp | InlineChunkTestFunction
170
169
 
171
170
  type InlineChunkConfig =
172
171
  | boolean
173
172
  | InlineChunkTest
174
- | { enable?: boolean | "auto"; test: InlineChunkTest };
173
+ | { enable?: boolean | 'auto', test: InlineChunkTest }
175
174
  ```
176
175
 
177
176
  ```ts
178
- import { defineConfig } from "@lynx-js/rspeedy";
177
+ import { defineConfig } from '@lynx-js/rspeedy'
179
178
 
180
179
  export default defineConfig({
181
180
  output: {
182
181
  inlineScripts: ({ name, size }) => {
183
- return name.includes("foo") && size < 1000;
182
+ return name.includes('foo') && size < 1000
184
183
  },
185
184
  },
186
- });
185
+ })
187
186
  ```
188
187
 
189
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)]:
@@ -263,13 +262,13 @@
263
262
  example:
264
263
 
265
264
  ```js
266
- import { defineConfig } from "@lynx-js/rspeedy";
265
+ import { defineConfig } from '@lynx-js/rspeedy'
267
266
 
268
267
  export default defineConfig({
269
268
  output: {
270
269
  inlineScripts: false,
271
270
  },
272
- });
271
+ })
273
272
  ```
274
273
 
275
274
  - Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
@@ -356,7 +355,7 @@
356
355
  Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
357
356
 
358
357
  ```js
359
- import { defineConfig } from "@lynx-js/rspeedy";
358
+ import { defineConfig } from '@lynx-js/rspeedy'
360
359
 
361
360
  export default defineConfig({
362
361
  tools: {
@@ -368,7 +367,7 @@
368
367
  },
369
368
  },
370
369
  },
371
- });
370
+ })
372
371
  ```
373
372
 
374
373
  - Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
@@ -544,7 +543,7 @@
544
543
  You may turn it off using `output.minify.css: false`:
545
544
 
546
545
  ```js
547
- import { defineConfig } from "@lynx-js/rspeedy";
546
+ import { defineConfig } from '@lynx-js/rspeedy'
548
547
 
549
548
  export default defineConfig({
550
549
  output: {
@@ -552,18 +551,18 @@
552
551
  css: false,
553
552
  },
554
553
  },
555
- });
554
+ })
556
555
  ```
557
556
 
558
557
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
559
558
 
560
559
  ```js
561
- import { defineConfig } from "@lynx-js/rspeedy";
562
- import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
560
+ import { defineConfig } from '@lynx-js/rspeedy'
561
+ import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
563
562
 
564
563
  export default defineConfig({
565
564
  plugins: [pluginCssMinimizer()],
566
- });
565
+ })
567
566
  ```
568
567
 
569
568
  ### Patch Changes
@@ -643,18 +642,18 @@
643
642
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
644
643
 
645
644
  ```js
646
- import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
647
- import { defineConfig } from "@lynx-js/rspeedy";
645
+ import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
646
+ import { defineConfig } from '@lynx-js/rspeedy'
648
647
 
649
648
  export default defineConfig({
650
649
  plugins: [
651
650
  pluginReactLynx({
652
651
  defineDCE: {
653
- __SOME_FALSE_DEFINE__: "false",
652
+ __SOME_FALSE_DEFINE__: 'false',
654
653
  },
655
654
  }),
656
655
  ],
657
- });
656
+ })
658
657
  ```
659
658
 
660
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.
@@ -662,20 +661,20 @@
662
661
  For example, `import` initialized by dead code will be removed:
663
662
 
664
663
  ```js
665
- import { foo } from "bar";
664
+ import { foo } from 'bar'
666
665
 
667
666
  if (__SOME_FALSE_DEFINE__) {
668
- foo();
669
- console.log("dead code");
667
+ foo()
668
+ console.log('dead code')
670
669
  } else {
671
- console.log("reachable code");
670
+ console.log('reachable code')
672
671
  }
673
672
  ```
674
673
 
675
674
  will be transformed to:
676
675
 
677
676
  ```js
678
- console.log("reachable code");
677
+ console.log('reachable code')
679
678
  ```
680
679
 
681
680
  - Updated dependencies [8dd6cca]
@@ -718,18 +717,18 @@
718
717
  - a30c83d: Add `compat.removeComponentAttrRegex`.
719
718
 
720
719
  ```js
721
- import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
722
- import { defineConfig } from "@lynx-js/rspeedy";
720
+ import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
721
+ import { defineConfig } from '@lynx-js/rspeedy'
723
722
 
724
723
  export default defineConfig({
725
724
  plugins: [
726
725
  pluginReactLynx({
727
726
  compat: {
728
- removeComponentAttrRegex: "YOUR REGEX",
727
+ removeComponentAttrRegex: 'YOUR REGEX',
729
728
  },
730
729
  }),
731
730
  ],
732
- });
731
+ })
733
732
  ```
734
733
 
735
734
  NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
@@ -748,11 +747,11 @@
748
747
 
749
748
  ```javascript
750
749
  // bar.ts
751
- import "background-only";
750
+ import 'background-only'
752
751
 
753
752
  export const bar = () => {
754
- return "bar";
755
- };
753
+ return 'bar'
754
+ }
756
755
  ```
757
756
 
758
757
  If `bar` is called in `main-thread`, build time error will be triggered.
@@ -761,15 +760,15 @@
761
760
 
762
761
  ```tsx
763
762
  // App.tsx
764
- import { bar } from "./bar.js";
763
+ import { bar } from './bar.js'
765
764
 
766
765
  function App() {
767
- bar();
766
+ bar()
768
767
  return (
769
768
  <view>
770
769
  <text>Hello, Lynx x rspeedy</text>
771
770
  </view>
772
- );
771
+ )
773
772
  }
774
773
  ```
775
774
 
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-20250921-d0ef559f",
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-20250921-d0ef559f",
36
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.11.0-canary-20250921-d0ef559f",
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-20250921-d0ef559f",
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-20250921-d0ef559f",
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-20250921-d0ef559f",
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-20250921-d0ef559f",
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": {