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

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