@lynx-js/react-rsbuild-plugin-canary 0.12.0 → 0.12.1-canary-20251208-8cdb69d4

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 +53 -42
  2. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.12.1-canary-20251208085600-8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`8cdb69d`](https://github.com/lynx-family/lynx-stack/commit/8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9), [`8cdb69d`](https://github.com/lynx-family/lynx-stack/commit/8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9)]:
8
+ - @lynx-js/css-extract-webpack-plugin@0.7.0-canary-20251208085600-8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9
9
+ - @lynx-js/template-webpack-plugin@0.10.0-canary-20251208085600-8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9
10
+ - @lynx-js/react-webpack-plugin@1.0.0-canary-20251208085600-8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9
11
+ - @lynx-js/react-alias-rsbuild-plugin@0.12.1-canary-20251208085600-8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9
12
+ - @lynx-js/react-refresh-webpack-plugin@1.0.0-canary-20251208085600-8cdb69d4b2cc3e9925a2494ee8a889d7af17e2e9
13
+
3
14
  ## 0.12.0
4
15
 
5
16
  ### Minor Changes
@@ -29,8 +40,8 @@
29
40
  With this change you can setup [React Compiler](https://react.dev/learn/react-compiler) for ReactLynx by `pluginBabel`:
30
41
 
31
42
  ```js
32
- import { defineConfig } from '@lynx-js/rspeedy'
33
- import { pluginBabel } from '@rsbuild/plugin-babel'
43
+ import { defineConfig } from "@lynx-js/rspeedy";
44
+ import { pluginBabel } from "@rsbuild/plugin-babel";
34
45
 
35
46
  export default defineConfig({
36
47
  plugins: [
@@ -38,17 +49,17 @@
38
49
  include: /\.(?:jsx|tsx)$/,
39
50
  babelLoaderOptions(opts) {
40
51
  opts.plugins?.unshift([
41
- 'babel-plugin-react-compiler',
52
+ "babel-plugin-react-compiler",
42
53
  // See https://react.dev/reference/react-compiler/configuration for config
43
54
  {
44
55
  // ReactLynx only supports target to version 17
45
- target: '17',
56
+ target: "17",
46
57
  },
47
- ])
58
+ ]);
48
59
  },
49
60
  }),
50
61
  ],
51
- })
62
+ });
52
63
  ```
53
64
 
54
65
  - Updated dependencies [[`e7d186a`](https://github.com/lynx-family/lynx-stack/commit/e7d186a6fcf08fecf18b5ab82b004b955bb1a2b3), [`0d7a4c3`](https://github.com/lynx-family/lynx-stack/commit/0d7a4c3d49d63e30d5f05c372ef99ee5cf2fcadd)]:
@@ -251,28 +262,28 @@
251
262
 
252
263
  ```ts
253
264
  type InlineChunkTestFunction = (params: {
254
- size: number
255
- name: string
256
- }) => boolean
265
+ size: number;
266
+ name: string;
267
+ }) => boolean;
257
268
 
258
- type InlineChunkTest = RegExp | InlineChunkTestFunction
269
+ type InlineChunkTest = RegExp | InlineChunkTestFunction;
259
270
 
260
271
  type InlineChunkConfig =
261
272
  | boolean
262
273
  | InlineChunkTest
263
- | { enable?: boolean | 'auto', test: InlineChunkTest }
274
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
264
275
  ```
265
276
 
266
277
  ```ts
267
- import { defineConfig } from '@lynx-js/rspeedy'
278
+ import { defineConfig } from "@lynx-js/rspeedy";
268
279
 
269
280
  export default defineConfig({
270
281
  output: {
271
282
  inlineScripts: ({ name, size }) => {
272
- return name.includes('foo') && size < 1000
283
+ return name.includes("foo") && size < 1000;
273
284
  },
274
285
  },
275
- })
286
+ });
276
287
  ```
277
288
 
278
289
  - 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)]:
@@ -352,13 +363,13 @@
352
363
  example:
353
364
 
354
365
  ```js
355
- import { defineConfig } from '@lynx-js/rspeedy'
366
+ import { defineConfig } from "@lynx-js/rspeedy";
356
367
 
357
368
  export default defineConfig({
358
369
  output: {
359
370
  inlineScripts: false,
360
371
  },
361
- })
372
+ });
362
373
  ```
363
374
 
364
375
  - Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
@@ -445,7 +456,7 @@
445
456
  Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
446
457
 
447
458
  ```js
448
- import { defineConfig } from '@lynx-js/rspeedy'
459
+ import { defineConfig } from "@lynx-js/rspeedy";
449
460
 
450
461
  export default defineConfig({
451
462
  tools: {
@@ -457,7 +468,7 @@
457
468
  },
458
469
  },
459
470
  },
460
- })
471
+ });
461
472
  ```
462
473
 
463
474
  - Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
@@ -633,7 +644,7 @@
633
644
  You may turn it off using `output.minify.css: false`:
634
645
 
635
646
  ```js
636
- import { defineConfig } from '@lynx-js/rspeedy'
647
+ import { defineConfig } from "@lynx-js/rspeedy";
637
648
 
638
649
  export default defineConfig({
639
650
  output: {
@@ -641,18 +652,18 @@
641
652
  css: false,
642
653
  },
643
654
  },
644
- })
655
+ });
645
656
  ```
646
657
 
647
658
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
648
659
 
649
660
  ```js
650
- import { defineConfig } from '@lynx-js/rspeedy'
651
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
661
+ import { defineConfig } from "@lynx-js/rspeedy";
662
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
652
663
 
653
664
  export default defineConfig({
654
665
  plugins: [pluginCssMinimizer()],
655
- })
666
+ });
656
667
  ```
657
668
 
658
669
  ### Patch Changes
@@ -732,18 +743,18 @@
732
743
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
733
744
 
734
745
  ```js
735
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
736
- import { defineConfig } from '@lynx-js/rspeedy'
746
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
747
+ import { defineConfig } from "@lynx-js/rspeedy";
737
748
 
738
749
  export default defineConfig({
739
750
  plugins: [
740
751
  pluginReactLynx({
741
752
  defineDCE: {
742
- __SOME_FALSE_DEFINE__: 'false',
753
+ __SOME_FALSE_DEFINE__: "false",
743
754
  },
744
755
  }),
745
756
  ],
746
- })
757
+ });
747
758
  ```
748
759
 
749
760
  Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
@@ -751,20 +762,20 @@
751
762
  For example, `import` initialized by dead code will be removed:
752
763
 
753
764
  ```js
754
- import { foo } from 'bar'
765
+ import { foo } from "bar";
755
766
 
756
767
  if (__SOME_FALSE_DEFINE__) {
757
- foo()
758
- console.log('dead code')
768
+ foo();
769
+ console.log("dead code");
759
770
  } else {
760
- console.log('reachable code')
771
+ console.log("reachable code");
761
772
  }
762
773
  ```
763
774
 
764
775
  will be transformed to:
765
776
 
766
777
  ```js
767
- console.log('reachable code')
778
+ console.log("reachable code");
768
779
  ```
769
780
 
770
781
  - Updated dependencies [8dd6cca]
@@ -807,18 +818,18 @@
807
818
  - a30c83d: Add `compat.removeComponentAttrRegex`.
808
819
 
809
820
  ```js
810
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
811
- import { defineConfig } from '@lynx-js/rspeedy'
821
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
822
+ import { defineConfig } from "@lynx-js/rspeedy";
812
823
 
813
824
  export default defineConfig({
814
825
  plugins: [
815
826
  pluginReactLynx({
816
827
  compat: {
817
- removeComponentAttrRegex: 'YOUR REGEX',
828
+ removeComponentAttrRegex: "YOUR REGEX",
818
829
  },
819
830
  }),
820
831
  ],
821
- })
832
+ });
822
833
  ```
823
834
 
824
835
  NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
@@ -837,11 +848,11 @@
837
848
 
838
849
  ```javascript
839
850
  // bar.ts
840
- import 'background-only'
851
+ import "background-only";
841
852
 
842
853
  export const bar = () => {
843
- return 'bar'
844
- }
854
+ return "bar";
855
+ };
845
856
  ```
846
857
 
847
858
  If `bar` is called in `main-thread`, build time error will be triggered.
@@ -850,15 +861,15 @@
850
861
 
851
862
  ```tsx
852
863
  // App.tsx
853
- import { bar } from './bar.js'
864
+ import { bar } from "./bar.js";
854
865
 
855
866
  function App() {
856
- bar()
867
+ bar();
857
868
  return (
858
869
  <view>
859
870
  <text>Hello, Lynx x rspeedy</text>
860
871
  </view>
861
- )
872
+ );
862
873
  }
863
874
  ```
864
875
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin-canary",
3
- "version": "0.12.0",
3
+ "version": "0.12.1-canary-20251208-8cdb69d4",
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.5",
36
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.12.0",
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.2",
35
+ "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.7.0-canary-20251208-8cdb69d4",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.12.1-canary-20251208-8cdb69d4",
37
+ "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@1.0.0-canary-20251208-8cdb69d4",
38
+ "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@1.0.0-canary-20251208-8cdb69d4",
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.2",
40
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.10.0-canary-20251208-8cdb69d4",
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
  },
@@ -54,10 +54,10 @@
54
54
  "type-fest": "^5.0.1",
55
55
  "typia": "9.7.2",
56
56
  "typia-rspack-plugin": "2.2.2",
57
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.115.0",
58
57
  "@lynx-js/react-transform": "0.2.0",
58
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.12.1",
59
59
  "@lynx-js/vitest-setup": "0.0.0",
60
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.12.1"
60
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.115.0"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@lynx-js/react": "*"