@lynx-js/react-rsbuild-plugin-canary 0.10.1 → 0.10.2-canary-20250530-5f0ce5c3

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 -28
  2. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.10.2-canary-20250530131803-5f0ce5c3bc910a34e20281aa10e84228aea3a888
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix lazy bundle build failed on Rspeedy v0.9.8 (with `output.iife: true`). ([#972](https://github.com/lynx-family/lynx-stack/pull/972))
8
+
9
+ - Updated dependencies [[`81361f3`](https://github.com/lynx-family/lynx-stack/commit/81361f3c72001ffdf07f2f9f53f8e43d2ff7c961), [`7097f52`](https://github.com/lynx-family/lynx-stack/commit/7097f52a53460527f786e2a8f150c3a907b8e722), [`38de3fc`](https://github.com/lynx-family/lynx-stack/commit/38de3fce3c72668d0a9c7952e529d5527427e9e5), [`632f978`](https://github.com/lynx-family/lynx-stack/commit/632f9780424280efd5bc834cb919a49132c0f392), [`43cd520`](https://github.com/lynx-family/lynx-stack/commit/43cd520df78c3dc77aeb347a0be8c8f3ff62cc3f)]:
10
+ - @lynx-js/react-webpack-plugin@0.6.15-canary-20250530131803-5f0ce5c3bc910a34e20281aa10e84228aea3a888
11
+ - @lynx-js/react-alias-rsbuild-plugin@0.10.2-canary-20250530131803-5f0ce5c3bc910a34e20281aa10e84228aea3a888
12
+ - @lynx-js/react@0.109.1-canary-20250530131803-5f0ce5c3bc910a34e20281aa10e84228aea3a888
13
+ - @lynx-js/template-webpack-plugin@0.7.1-canary-20250530131803-5f0ce5c3bc910a34e20281aa10e84228aea3a888
14
+ - @lynx-js/react-refresh-webpack-plugin@0.3.3
15
+ - @lynx-js/css-extract-webpack-plugin@0.5.4
16
+
3
17
  ## 0.10.1
4
18
 
5
19
  ### Patch Changes
@@ -24,13 +38,13 @@
24
38
  example:
25
39
 
26
40
  ```js
27
- import { defineConfig } from '@lynx-js/rspeedy'
41
+ import { defineConfig } from "@lynx-js/rspeedy";
28
42
 
29
43
  export default defineConfig({
30
44
  output: {
31
45
  inlineScripts: false,
32
46
  },
33
- })
47
+ });
34
48
  ```
35
49
 
36
50
  - Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
@@ -117,7 +131,7 @@
117
131
  Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
118
132
 
119
133
  ```js
120
- import { defineConfig } from '@lynx-js/rspeedy'
134
+ import { defineConfig } from "@lynx-js/rspeedy";
121
135
 
122
136
  export default defineConfig({
123
137
  tools: {
@@ -129,7 +143,7 @@
129
143
  },
130
144
  },
131
145
  },
132
- })
146
+ });
133
147
  ```
134
148
 
135
149
  - Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
@@ -305,7 +319,7 @@
305
319
  You may turn it off using `output.minify.css: false`:
306
320
 
307
321
  ```js
308
- import { defineConfig } from '@lynx-js/rspeedy'
322
+ import { defineConfig } from "@lynx-js/rspeedy";
309
323
 
310
324
  export default defineConfig({
311
325
  output: {
@@ -313,18 +327,18 @@
313
327
  css: false,
314
328
  },
315
329
  },
316
- })
330
+ });
317
331
  ```
318
332
 
319
333
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
320
334
 
321
335
  ```js
322
- import { defineConfig } from '@lynx-js/rspeedy'
323
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
336
+ import { defineConfig } from "@lynx-js/rspeedy";
337
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
324
338
 
325
339
  export default defineConfig({
326
340
  plugins: [pluginCssMinimizer()],
327
- })
341
+ });
328
342
  ```
329
343
 
330
344
  ### Patch Changes
@@ -404,18 +418,18 @@
404
418
  - e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
405
419
 
406
420
  ```js
407
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
408
- import { defineConfig } from '@lynx-js/rspeedy'
421
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
422
+ import { defineConfig } from "@lynx-js/rspeedy";
409
423
 
410
424
  export default defineConfig({
411
425
  plugins: [
412
426
  pluginReactLynx({
413
427
  defineDCE: {
414
- __SOME_FALSE_DEFINE__: 'false',
428
+ __SOME_FALSE_DEFINE__: "false",
415
429
  },
416
430
  }),
417
431
  ],
418
- })
432
+ });
419
433
  ```
420
434
 
421
435
  Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
@@ -423,20 +437,20 @@
423
437
  For example, `import` initialized by dead code will be removed:
424
438
 
425
439
  ```js
426
- import { foo } from 'bar'
440
+ import { foo } from "bar";
427
441
 
428
442
  if (__SOME_FALSE_DEFINE__) {
429
- foo()
430
- console.log('dead code')
443
+ foo();
444
+ console.log("dead code");
431
445
  } else {
432
- console.log('reachable code')
446
+ console.log("reachable code");
433
447
  }
434
448
  ```
435
449
 
436
450
  will be transformed to:
437
451
 
438
452
  ```js
439
- console.log('reachable code')
453
+ console.log("reachable code");
440
454
  ```
441
455
 
442
456
  - Updated dependencies [8dd6cca]
@@ -479,18 +493,18 @@
479
493
  - a30c83d: Add `compat.removeComponentAttrRegex`.
480
494
 
481
495
  ```js
482
- import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
483
- import { defineConfig } from '@lynx-js/rspeedy'
496
+ import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
497
+ import { defineConfig } from "@lynx-js/rspeedy";
484
498
 
485
499
  export default defineConfig({
486
500
  plugins: [
487
501
  pluginReactLynx({
488
502
  compat: {
489
- removeComponentAttrRegex: 'YOUR REGEX',
503
+ removeComponentAttrRegex: "YOUR REGEX",
490
504
  },
491
505
  }),
492
506
  ],
493
- })
507
+ });
494
508
  ```
495
509
 
496
510
  NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
@@ -509,11 +523,11 @@
509
523
 
510
524
  ```javascript
511
525
  // bar.ts
512
- import 'background-only'
526
+ import "background-only";
513
527
 
514
528
  export const bar = () => {
515
- return 'bar'
516
- }
529
+ return "bar";
530
+ };
517
531
  ```
518
532
 
519
533
  If `bar` is called in `main-thread`, build time error will be triggered.
@@ -522,15 +536,15 @@
522
536
 
523
537
  ```tsx
524
538
  // App.tsx
525
- import { bar } from './bar.js'
539
+ import { bar } from "./bar.js";
526
540
 
527
541
  function App() {
528
- bar()
542
+ bar();
529
543
  return (
530
544
  <view>
531
545
  <text>Hello, Lynx x rspeedy</text>
532
546
  </view>
533
- )
547
+ );
534
548
  }
535
549
  ```
536
550
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin-canary",
3
- "version": "0.10.1",
3
+ "version": "0.10.2-canary-20250530-5f0ce5c3",
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.5.4",
36
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.1",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.2-canary-20250530-5f0ce5c3",
37
37
  "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.3",
38
- "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.14",
38
+ "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.15-canary-20250530-5f0ce5c3",
39
39
  "@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.0",
40
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.7.0",
40
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.7.1-canary-20250530-5f0ce5c3",
41
41
  "background-only": "npm:background-only-canary@0.0.1"
42
42
  },
43
43
  "devDependencies": {
@@ -53,10 +53,10 @@
53
53
  "type-fest": "^4.41.0",
54
54
  "typia": "9.3.1",
55
55
  "typia-rspack-plugin": "2.1.0",
56
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.109.0",
56
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.109.1-canary-20250530-5f0ce5c3",
57
57
  "@lynx-js/react-transform": "0.2.0",
58
58
  "@lynx-js/vitest-setup": "0.0.0",
59
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.9.7"
59
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.9.8-canary-20250530-5f0ce5c3"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@lynx-js/react": "*"