@lynx-js/react-rsbuild-plugin-canary 0.10.9 → 0.10.10-canary-20250730-a4ee4fdd

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 +46 -36
  2. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.10.10-canary-20250730080951-a4ee4fdd507d38265da221ecf112c9cc911e1c0b
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`e9edca0`](https://github.com/lynx-family/lynx-stack/commit/e9edca0183c172b496f9d23ed17581ce3cb3d21d)]:
8
+ - @lynx-js/template-webpack-plugin@0.8.3-canary-20250730080951-a4ee4fdd507d38265da221ecf112c9cc911e1c0b
9
+ - @lynx-js/css-extract-webpack-plugin@0.6.0
10
+ - @lynx-js/react-webpack-plugin@0.6.19
11
+ - @lynx-js/react-alias-rsbuild-plugin@0.10.10-canary-20250730080951-a4ee4fdd507d38265da221ecf112c9cc911e1c0b
12
+
3
13
  ## 0.10.9
4
14
 
5
15
  ### Patch Changes
@@ -66,28 +76,28 @@
66
76
 
67
77
  ```ts
68
78
  type InlineChunkTestFunction = (params: {
69
- size: number
70
- name: string
71
- }) => boolean
79
+ size: number;
80
+ name: string;
81
+ }) => boolean;
72
82
 
73
- type InlineChunkTest = RegExp | InlineChunkTestFunction
83
+ type InlineChunkTest = RegExp | InlineChunkTestFunction;
74
84
 
75
85
  type InlineChunkConfig =
76
86
  | boolean
77
87
  | InlineChunkTest
78
- | { enable?: boolean | 'auto', test: InlineChunkTest }
88
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
79
89
  ```
80
90
 
81
91
  ```ts
82
- import { defineConfig } from '@lynx-js/rspeedy'
92
+ import { defineConfig } from "@lynx-js/rspeedy";
83
93
 
84
94
  export default defineConfig({
85
95
  output: {
86
96
  inlineScripts: ({ name, size }) => {
87
- return name.includes('foo') && size < 1000
97
+ return name.includes("foo") && size < 1000;
88
98
  },
89
99
  },
90
- })
100
+ });
91
101
  ```
92
102
 
93
103
  - 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)]:
@@ -167,13 +177,13 @@
167
177
  example:
168
178
 
169
179
  ```js
170
- import { defineConfig } from '@lynx-js/rspeedy'
180
+ import { defineConfig } from "@lynx-js/rspeedy";
171
181
 
172
182
  export default defineConfig({
173
183
  output: {
174
184
  inlineScripts: false,
175
185
  },
176
- })
186
+ });
177
187
  ```
178
188
 
179
189
  - Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
@@ -260,7 +270,7 @@
260
270
  Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
261
271
 
262
272
  ```js
263
- import { defineConfig } from '@lynx-js/rspeedy'
273
+ import { defineConfig } from "@lynx-js/rspeedy";
264
274
 
265
275
  export default defineConfig({
266
276
  tools: {
@@ -272,7 +282,7 @@
272
282
  },
273
283
  },
274
284
  },
275
- })
285
+ });
276
286
  ```
277
287
 
278
288
  - Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
@@ -448,7 +458,7 @@
448
458
  You may turn it off using `output.minify.css: false`:
449
459
 
450
460
  ```js
451
- import { defineConfig } from '@lynx-js/rspeedy'
461
+ import { defineConfig } from "@lynx-js/rspeedy";
452
462
 
453
463
  export default defineConfig({
454
464
  output: {
@@ -456,18 +466,18 @@
456
466
  css: false,
457
467
  },
458
468
  },
459
- })
469
+ });
460
470
  ```
461
471
 
462
472
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
463
473
 
464
474
  ```js
465
- import { defineConfig } from '@lynx-js/rspeedy'
466
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
475
+ import { defineConfig } from "@lynx-js/rspeedy";
476
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
467
477
 
468
478
  export default defineConfig({
469
479
  plugins: [pluginCssMinimizer()],
470
- })
480
+ });
471
481
  ```
472
482
 
473
483
  ### Patch Changes
@@ -547,18 +557,18 @@
547
557
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
548
558
 
549
559
  ```js
550
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
551
- import { defineConfig } from '@lynx-js/rspeedy'
560
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
561
+ import { defineConfig } from "@lynx-js/rspeedy";
552
562
 
553
563
  export default defineConfig({
554
564
  plugins: [
555
565
  pluginReactLynx({
556
566
  defineDCE: {
557
- __SOME_FALSE_DEFINE__: 'false',
567
+ __SOME_FALSE_DEFINE__: "false",
558
568
  },
559
569
  }),
560
570
  ],
561
- })
571
+ });
562
572
  ```
563
573
 
564
574
  Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
@@ -566,20 +576,20 @@
566
576
  For example, `import` initialized by dead code will be removed:
567
577
 
568
578
  ```js
569
- import { foo } from 'bar'
579
+ import { foo } from "bar";
570
580
 
571
581
  if (__SOME_FALSE_DEFINE__) {
572
- foo()
573
- console.log('dead code')
582
+ foo();
583
+ console.log("dead code");
574
584
  } else {
575
- console.log('reachable code')
585
+ console.log("reachable code");
576
586
  }
577
587
  ```
578
588
 
579
589
  will be transformed to:
580
590
 
581
591
  ```js
582
- console.log('reachable code')
592
+ console.log("reachable code");
583
593
  ```
584
594
 
585
595
  - Updated dependencies [8dd6cca]
@@ -622,18 +632,18 @@
622
632
  - a30c83d: Add `compat.removeComponentAttrRegex`.
623
633
 
624
634
  ```js
625
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
626
- import { defineConfig } from '@lynx-js/rspeedy'
635
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
636
+ import { defineConfig } from "@lynx-js/rspeedy";
627
637
 
628
638
  export default defineConfig({
629
639
  plugins: [
630
640
  pluginReactLynx({
631
641
  compat: {
632
- removeComponentAttrRegex: 'YOUR REGEX',
642
+ removeComponentAttrRegex: "YOUR REGEX",
633
643
  },
634
644
  }),
635
645
  ],
636
- })
646
+ });
637
647
  ```
638
648
 
639
649
  NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
@@ -652,11 +662,11 @@
652
662
 
653
663
  ```javascript
654
664
  // bar.ts
655
- import 'background-only'
665
+ import "background-only";
656
666
 
657
667
  export const bar = () => {
658
- return 'bar'
659
- }
668
+ return "bar";
669
+ };
660
670
  ```
661
671
 
662
672
  If `bar` is called in `main-thread`, build time error will be triggered.
@@ -665,15 +675,15 @@
665
675
 
666
676
  ```tsx
667
677
  // App.tsx
668
- import { bar } from './bar.js'
678
+ import { bar } from "./bar.js";
669
679
 
670
680
  function App() {
671
- bar()
681
+ bar();
672
682
  return (
673
683
  <view>
674
684
  <text>Hello, Lynx x rspeedy</text>
675
685
  </view>
676
- )
686
+ );
677
687
  }
678
688
  ```
679
689
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin-canary",
3
- "version": "0.10.9",
3
+ "version": "0.10.10-canary-20250730-a4ee4fdd",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -33,11 +33,11 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.0",
36
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.9",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.10-canary-20250730-a4ee4fdd",
37
37
  "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.4",
38
38
  "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.19",
39
39
  "@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.2",
40
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.8.2",
40
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.8.3-canary-20250730-a4ee4fdd",
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
  },
@@ -55,9 +55,9 @@
55
55
  "typia": "9.3.1",
56
56
  "typia-rspack-plugin": "2.1.0",
57
57
  "@lynx-js/react": "npm:@lynx-js/react-canary@0.112.0",
58
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.10.3",
59
58
  "@lynx-js/react-transform": "0.2.0",
60
- "@lynx-js/vitest-setup": "0.0.0"
59
+ "@lynx-js/vitest-setup": "0.0.0",
60
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.10.3"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@lynx-js/react": "*"