@lynx-js/react-rsbuild-plugin-canary 0.10.3 → 0.10.4-canary-20250610-0a0ef409
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.
- package/CHANGELOG.md +39 -28
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.10.4-canary-20250610075412-0a0ef4094a9c81f8849605c17a4c8f08dc128171
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`0a0ef40`](https://github.com/lynx-family/lynx-stack/commit/0a0ef4094a9c81f8849605c17a4c8f08dc128171), [`c181888`](https://github.com/lynx-family/lynx-stack/commit/c1818881c009de3c25b0a5b447ddd027c6b4ac20)]:
|
|
8
|
+
- @lynx-js/react-webpack-plugin@0.6.16-canary-20250610075412-0a0ef4094a9c81f8849605c17a4c8f08dc128171
|
|
9
|
+
- @lynx-js/react@0.109.3-canary-20250610075412-0a0ef4094a9c81f8849605c17a4c8f08dc128171
|
|
10
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.10.4-canary-20250610075412-0a0ef4094a9c81f8849605c17a4c8f08dc128171
|
|
11
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.3
|
|
12
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
13
|
+
|
|
3
14
|
## 0.10.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -54,13 +65,13 @@
|
|
|
54
65
|
example:
|
|
55
66
|
|
|
56
67
|
```js
|
|
57
|
-
import { defineConfig } from
|
|
68
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
58
69
|
|
|
59
70
|
export default defineConfig({
|
|
60
71
|
output: {
|
|
61
72
|
inlineScripts: false,
|
|
62
73
|
},
|
|
63
|
-
})
|
|
74
|
+
});
|
|
64
75
|
```
|
|
65
76
|
|
|
66
77
|
- Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
|
|
@@ -147,7 +158,7 @@
|
|
|
147
158
|
Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
|
|
148
159
|
|
|
149
160
|
```js
|
|
150
|
-
import { defineConfig } from
|
|
161
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
151
162
|
|
|
152
163
|
export default defineConfig({
|
|
153
164
|
tools: {
|
|
@@ -159,7 +170,7 @@
|
|
|
159
170
|
},
|
|
160
171
|
},
|
|
161
172
|
},
|
|
162
|
-
})
|
|
173
|
+
});
|
|
163
174
|
```
|
|
164
175
|
|
|
165
176
|
- Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
|
|
@@ -335,7 +346,7 @@
|
|
|
335
346
|
You may turn it off using `output.minify.css: false`:
|
|
336
347
|
|
|
337
348
|
```js
|
|
338
|
-
import { defineConfig } from
|
|
349
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
339
350
|
|
|
340
351
|
export default defineConfig({
|
|
341
352
|
output: {
|
|
@@ -343,18 +354,18 @@
|
|
|
343
354
|
css: false,
|
|
344
355
|
},
|
|
345
356
|
},
|
|
346
|
-
})
|
|
357
|
+
});
|
|
347
358
|
```
|
|
348
359
|
|
|
349
360
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
350
361
|
|
|
351
362
|
```js
|
|
352
|
-
import { defineConfig } from
|
|
353
|
-
import { pluginCssMinimizer } from
|
|
363
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
364
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
354
365
|
|
|
355
366
|
export default defineConfig({
|
|
356
367
|
plugins: [pluginCssMinimizer()],
|
|
357
|
-
})
|
|
368
|
+
});
|
|
358
369
|
```
|
|
359
370
|
|
|
360
371
|
### Patch Changes
|
|
@@ -434,18 +445,18 @@
|
|
|
434
445
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
435
446
|
|
|
436
447
|
```js
|
|
437
|
-
import { pluginReactLynx } from
|
|
438
|
-
import { defineConfig } from
|
|
448
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
449
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
439
450
|
|
|
440
451
|
export default defineConfig({
|
|
441
452
|
plugins: [
|
|
442
453
|
pluginReactLynx({
|
|
443
454
|
defineDCE: {
|
|
444
|
-
__SOME_FALSE_DEFINE__:
|
|
455
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
445
456
|
},
|
|
446
457
|
}),
|
|
447
458
|
],
|
|
448
|
-
})
|
|
459
|
+
});
|
|
449
460
|
```
|
|
450
461
|
|
|
451
462
|
Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
|
|
@@ -453,20 +464,20 @@
|
|
|
453
464
|
For example, `import` initialized by dead code will be removed:
|
|
454
465
|
|
|
455
466
|
```js
|
|
456
|
-
import { foo } from
|
|
467
|
+
import { foo } from "bar";
|
|
457
468
|
|
|
458
469
|
if (__SOME_FALSE_DEFINE__) {
|
|
459
|
-
foo()
|
|
460
|
-
console.log(
|
|
470
|
+
foo();
|
|
471
|
+
console.log("dead code");
|
|
461
472
|
} else {
|
|
462
|
-
console.log(
|
|
473
|
+
console.log("reachable code");
|
|
463
474
|
}
|
|
464
475
|
```
|
|
465
476
|
|
|
466
477
|
will be transformed to:
|
|
467
478
|
|
|
468
479
|
```js
|
|
469
|
-
console.log(
|
|
480
|
+
console.log("reachable code");
|
|
470
481
|
```
|
|
471
482
|
|
|
472
483
|
- Updated dependencies [8dd6cca]
|
|
@@ -509,18 +520,18 @@
|
|
|
509
520
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
510
521
|
|
|
511
522
|
```js
|
|
512
|
-
import { pluginReactLynx } from
|
|
513
|
-
import { defineConfig } from
|
|
523
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
524
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
514
525
|
|
|
515
526
|
export default defineConfig({
|
|
516
527
|
plugins: [
|
|
517
528
|
pluginReactLynx({
|
|
518
529
|
compat: {
|
|
519
|
-
removeComponentAttrRegex:
|
|
530
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
520
531
|
},
|
|
521
532
|
}),
|
|
522
533
|
],
|
|
523
|
-
})
|
|
534
|
+
});
|
|
524
535
|
```
|
|
525
536
|
|
|
526
537
|
NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
|
|
@@ -539,11 +550,11 @@
|
|
|
539
550
|
|
|
540
551
|
```javascript
|
|
541
552
|
// bar.ts
|
|
542
|
-
import
|
|
553
|
+
import "background-only";
|
|
543
554
|
|
|
544
555
|
export const bar = () => {
|
|
545
|
-
return
|
|
546
|
-
}
|
|
556
|
+
return "bar";
|
|
557
|
+
};
|
|
547
558
|
```
|
|
548
559
|
|
|
549
560
|
If `bar` is called in `main-thread`, build time error will be triggered.
|
|
@@ -552,15 +563,15 @@
|
|
|
552
563
|
|
|
553
564
|
```tsx
|
|
554
565
|
// App.tsx
|
|
555
|
-
import { bar } from
|
|
566
|
+
import { bar } from "./bar.js";
|
|
556
567
|
|
|
557
568
|
function App() {
|
|
558
|
-
bar()
|
|
569
|
+
bar();
|
|
559
570
|
return (
|
|
560
571
|
<view>
|
|
561
572
|
<text>Hello, Lynx x rspeedy</text>
|
|
562
573
|
</view>
|
|
563
|
-
)
|
|
574
|
+
);
|
|
564
575
|
}
|
|
565
576
|
```
|
|
566
577
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin-canary",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4-canary-20250610-0a0ef409",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -33,9 +33,9 @@
|
|
|
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.
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.4-canary-20250610-0a0ef409",
|
|
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.
|
|
38
|
+
"@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.16-canary-20250610-0a0ef409",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.1",
|
|
40
40
|
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.7.2",
|
|
41
41
|
"@lynx-js/use-sync-external-store": "npm:@lynx-js/use-sync-external-store-canary@1.5.0",
|
|
@@ -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.109.
|
|
57
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.109.3-canary-20250610-0a0ef409",
|
|
58
58
|
"@lynx-js/react-transform": "0.2.0",
|
|
59
|
-
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.9.
|
|
59
|
+
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.9.10-canary-20250610-0a0ef409",
|
|
60
60
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|