@lynx-js/react-rsbuild-plugin-canary 0.10.6 → 0.10.7-canary-20250709-224c653f

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 +47 -36
  2. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.10.7-canary-20250709071816-224c653f370d807281fa0a9ffbb4f4dd5c9d308e
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`d513dd9`](https://github.com/lynx-family/lynx-stack/commit/d513dd9fb7ee950f36aaaee0d62ede8072f7b031), [`4bdd47a`](https://github.com/lynx-family/lynx-stack/commit/4bdd47ab1f8e3cb9e689fd091dd4a33bdc0a87a9)]:
8
+ - @lynx-js/react-refresh-webpack-plugin@0.3.4-canary-20250709071816-224c653f370d807281fa0a9ffbb4f4dd5c9d308e
9
+ - @lynx-js/react@0.111.1-canary-20250709071816-224c653f370d807281fa0a9ffbb4f4dd5c9d308e
10
+ - @lynx-js/react-alias-rsbuild-plugin@0.10.7-canary-20250709071816-224c653f370d807281fa0a9ffbb4f4dd5c9d308e
11
+ - @lynx-js/use-sync-external-store@1.5.0
12
+ - @lynx-js/react-webpack-plugin@0.6.18
13
+
3
14
  ## 0.10.6
4
15
 
5
16
  ### Patch Changes
@@ -22,28 +33,28 @@
22
33
 
23
34
  ```ts
24
35
  type InlineChunkTestFunction = (params: {
25
- size: number
26
- name: string
27
- }) => boolean
36
+ size: number;
37
+ name: string;
38
+ }) => boolean;
28
39
 
29
- type InlineChunkTest = RegExp | InlineChunkTestFunction
40
+ type InlineChunkTest = RegExp | InlineChunkTestFunction;
30
41
 
31
42
  type InlineChunkConfig =
32
43
  | boolean
33
44
  | InlineChunkTest
34
- | { enable?: boolean | 'auto', test: InlineChunkTest }
45
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
35
46
  ```
36
47
 
37
48
  ```ts
38
- import { defineConfig } from '@lynx-js/rspeedy'
49
+ import { defineConfig } from "@lynx-js/rspeedy";
39
50
 
40
51
  export default defineConfig({
41
52
  output: {
42
53
  inlineScripts: ({ name, size }) => {
43
- return name.includes('foo') && size < 1000
54
+ return name.includes("foo") && size < 1000;
44
55
  },
45
56
  },
46
- })
57
+ });
47
58
  ```
48
59
 
49
60
  - 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)]:
@@ -123,13 +134,13 @@
123
134
  example:
124
135
 
125
136
  ```js
126
- import { defineConfig } from '@lynx-js/rspeedy'
137
+ import { defineConfig } from "@lynx-js/rspeedy";
127
138
 
128
139
  export default defineConfig({
129
140
  output: {
130
141
  inlineScripts: false,
131
142
  },
132
- })
143
+ });
133
144
  ```
134
145
 
135
146
  - Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
@@ -216,7 +227,7 @@
216
227
  Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
217
228
 
218
229
  ```js
219
- import { defineConfig } from '@lynx-js/rspeedy'
230
+ import { defineConfig } from "@lynx-js/rspeedy";
220
231
 
221
232
  export default defineConfig({
222
233
  tools: {
@@ -228,7 +239,7 @@
228
239
  },
229
240
  },
230
241
  },
231
- })
242
+ });
232
243
  ```
233
244
 
234
245
  - Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
@@ -404,7 +415,7 @@
404
415
  You may turn it off using `output.minify.css: false`:
405
416
 
406
417
  ```js
407
- import { defineConfig } from '@lynx-js/rspeedy'
418
+ import { defineConfig } from "@lynx-js/rspeedy";
408
419
 
409
420
  export default defineConfig({
410
421
  output: {
@@ -412,18 +423,18 @@
412
423
  css: false,
413
424
  },
414
425
  },
415
- })
426
+ });
416
427
  ```
417
428
 
418
429
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
419
430
 
420
431
  ```js
421
- import { defineConfig } from '@lynx-js/rspeedy'
422
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
432
+ import { defineConfig } from "@lynx-js/rspeedy";
433
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
423
434
 
424
435
  export default defineConfig({
425
436
  plugins: [pluginCssMinimizer()],
426
- })
437
+ });
427
438
  ```
428
439
 
429
440
  ### Patch Changes
@@ -503,18 +514,18 @@
503
514
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
504
515
 
505
516
  ```js
506
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
507
- import { defineConfig } from '@lynx-js/rspeedy'
517
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
518
+ import { defineConfig } from "@lynx-js/rspeedy";
508
519
 
509
520
  export default defineConfig({
510
521
  plugins: [
511
522
  pluginReactLynx({
512
523
  defineDCE: {
513
- __SOME_FALSE_DEFINE__: 'false',
524
+ __SOME_FALSE_DEFINE__: "false",
514
525
  },
515
526
  }),
516
527
  ],
517
- })
528
+ });
518
529
  ```
519
530
 
520
531
  Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
@@ -522,20 +533,20 @@
522
533
  For example, `import` initialized by dead code will be removed:
523
534
 
524
535
  ```js
525
- import { foo } from 'bar'
536
+ import { foo } from "bar";
526
537
 
527
538
  if (__SOME_FALSE_DEFINE__) {
528
- foo()
529
- console.log('dead code')
539
+ foo();
540
+ console.log("dead code");
530
541
  } else {
531
- console.log('reachable code')
542
+ console.log("reachable code");
532
543
  }
533
544
  ```
534
545
 
535
546
  will be transformed to:
536
547
 
537
548
  ```js
538
- console.log('reachable code')
549
+ console.log("reachable code");
539
550
  ```
540
551
 
541
552
  - Updated dependencies [8dd6cca]
@@ -578,18 +589,18 @@
578
589
  - a30c83d: Add `compat.removeComponentAttrRegex`.
579
590
 
580
591
  ```js
581
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
582
- import { defineConfig } from '@lynx-js/rspeedy'
592
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
593
+ import { defineConfig } from "@lynx-js/rspeedy";
583
594
 
584
595
  export default defineConfig({
585
596
  plugins: [
586
597
  pluginReactLynx({
587
598
  compat: {
588
- removeComponentAttrRegex: 'YOUR REGEX',
599
+ removeComponentAttrRegex: "YOUR REGEX",
589
600
  },
590
601
  }),
591
602
  ],
592
- })
603
+ });
593
604
  ```
594
605
 
595
606
  NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
@@ -608,11 +619,11 @@
608
619
 
609
620
  ```javascript
610
621
  // bar.ts
611
- import 'background-only'
622
+ import "background-only";
612
623
 
613
624
  export const bar = () => {
614
- return 'bar'
615
- }
625
+ return "bar";
626
+ };
616
627
  ```
617
628
 
618
629
  If `bar` is called in `main-thread`, build time error will be triggered.
@@ -621,15 +632,15 @@
621
632
 
622
633
  ```tsx
623
634
  // App.tsx
624
- import { bar } from './bar.js'
635
+ import { bar } from "./bar.js";
625
636
 
626
637
  function App() {
627
- bar()
638
+ bar();
628
639
  return (
629
640
  <view>
630
641
  <text>Hello, Lynx x rspeedy</text>
631
642
  </view>
632
- )
643
+ );
633
644
  }
634
645
  ```
635
646
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin-canary",
3
- "version": "0.10.6",
3
+ "version": "0.10.7-canary-20250709-224c653f",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -33,8 +33,8 @@
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.6",
37
- "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.3",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.7-canary-20250709-224c653f",
37
+ "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.4-canary-20250709-224c653f",
38
38
  "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.18",
39
39
  "@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.2",
40
40
  "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.8.1",
@@ -44,8 +44,8 @@
44
44
  "devDependencies": {
45
45
  "@microsoft/api-extractor": "7.52.8",
46
46
  "@rollup/plugin-typescript": "^12.1.4",
47
- "@rsbuild/core": "1.4.3",
48
- "@rsbuild/plugin-sass": "1.3.2",
47
+ "@rsbuild/core": "1.4.5",
48
+ "@rsbuild/plugin-sass": "1.3.3",
49
49
  "@rsbuild/plugin-typed-css-modules": "1.0.2",
50
50
  "@rsbuild/plugin-webpack-swc": "1.1.1",
51
51
  "@rsbuild/webpack": "1.3.2",
@@ -54,9 +54,9 @@
54
54
  "type-fest": "^4.41.0",
55
55
  "typia": "9.3.1",
56
56
  "typia-rspack-plugin": "2.1.0",
57
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.111.1-canary-20250709-224c653f",
57
58
  "@lynx-js/react-transform": "0.2.0",
58
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.10.0",
59
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.111.0",
59
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.10.1-canary-20250709-224c653f",
60
60
  "@lynx-js/vitest-setup": "0.0.0"
61
61
  },
62
62
  "peerDependencies": {