@lynx-js/react-rsbuild-plugin-canary 0.10.4-canary-20250620-57c33046 → 0.10.4
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 +34 -35
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
-
## 0.10.4
|
|
3
|
+
## 0.10.4
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Support `@lynx-js/react` v0.110.0. ([#770](https://github.com/lynx-family/lynx-stack/pull/770))
|
|
8
8
|
|
|
9
|
-
- Updated dependencies [[`f84a1cc`](https://github.com/lynx-family/lynx-stack/commit/f84a1cce524af653f19bfc18657851ed24a9ba79), [`0d151db`](https://github.com/lynx-family/lynx-stack/commit/0d151db39fe9c7eeb75010798948e1964a962515), [`0d151db`](https://github.com/lynx-family/lynx-stack/commit/0d151db39fe9c7eeb75010798948e1964a962515), [`51676ed`](https://github.com/lynx-family/lynx-stack/commit/51676edf4076dd2bbccaf8048c8e0abe4f3c142d), [`
|
|
10
|
-
- @lynx-js/react-alias-rsbuild-plugin@0.10.4
|
|
11
|
-
- @lynx-js/react-webpack-plugin@0.6.16
|
|
12
|
-
- @lynx-js/css-extract-webpack-plugin@0.6.0
|
|
13
|
-
- @lynx-js/
|
|
14
|
-
- @lynx-js/template-webpack-plugin@0.8.0-canary-20250620153931-57c33046d84ac41d56a088169a566eadf316fd28
|
|
9
|
+
- Updated dependencies [[`f84a1cc`](https://github.com/lynx-family/lynx-stack/commit/f84a1cce524af653f19bfc18657851ed24a9ba79), [`0d151db`](https://github.com/lynx-family/lynx-stack/commit/0d151db39fe9c7eeb75010798948e1964a962515), [`0d151db`](https://github.com/lynx-family/lynx-stack/commit/0d151db39fe9c7eeb75010798948e1964a962515), [`51676ed`](https://github.com/lynx-family/lynx-stack/commit/51676edf4076dd2bbccaf8048c8e0abe4f3c142d), [`0d151db`](https://github.com/lynx-family/lynx-stack/commit/0d151db39fe9c7eeb75010798948e1964a962515), [`a43ae05`](https://github.com/lynx-family/lynx-stack/commit/a43ae054bbe60250b0faf7a15d23b0445bb3c594), [`0a0ef40`](https://github.com/lynx-family/lynx-stack/commit/0a0ef4094a9c81f8849605c17a4c8f08dc128171), [`9b61210`](https://github.com/lynx-family/lynx-stack/commit/9b6121090ce349156c09238cb3bb167066b35a21)]:
|
|
10
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.10.4
|
|
11
|
+
- @lynx-js/react-webpack-plugin@0.6.16
|
|
12
|
+
- @lynx-js/css-extract-webpack-plugin@0.6.0
|
|
13
|
+
- @lynx-js/template-webpack-plugin@0.8.0
|
|
15
14
|
- @lynx-js/react-refresh-webpack-plugin@0.3.3
|
|
16
15
|
- @lynx-js/use-sync-external-store@1.5.0
|
|
17
16
|
|
|
@@ -69,13 +68,13 @@
|
|
|
69
68
|
example:
|
|
70
69
|
|
|
71
70
|
```js
|
|
72
|
-
import { defineConfig } from
|
|
71
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
73
72
|
|
|
74
73
|
export default defineConfig({
|
|
75
74
|
output: {
|
|
76
75
|
inlineScripts: false,
|
|
77
76
|
},
|
|
78
|
-
})
|
|
77
|
+
})
|
|
79
78
|
```
|
|
80
79
|
|
|
81
80
|
- Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
|
|
@@ -162,7 +161,7 @@
|
|
|
162
161
|
Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
|
|
163
162
|
|
|
164
163
|
```js
|
|
165
|
-
import { defineConfig } from
|
|
164
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
166
165
|
|
|
167
166
|
export default defineConfig({
|
|
168
167
|
tools: {
|
|
@@ -174,7 +173,7 @@
|
|
|
174
173
|
},
|
|
175
174
|
},
|
|
176
175
|
},
|
|
177
|
-
})
|
|
176
|
+
})
|
|
178
177
|
```
|
|
179
178
|
|
|
180
179
|
- Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
|
|
@@ -350,7 +349,7 @@
|
|
|
350
349
|
You may turn it off using `output.minify.css: false`:
|
|
351
350
|
|
|
352
351
|
```js
|
|
353
|
-
import { defineConfig } from
|
|
352
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
354
353
|
|
|
355
354
|
export default defineConfig({
|
|
356
355
|
output: {
|
|
@@ -358,18 +357,18 @@
|
|
|
358
357
|
css: false,
|
|
359
358
|
},
|
|
360
359
|
},
|
|
361
|
-
})
|
|
360
|
+
})
|
|
362
361
|
```
|
|
363
362
|
|
|
364
363
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
365
364
|
|
|
366
365
|
```js
|
|
367
|
-
import { defineConfig } from
|
|
368
|
-
import { pluginCssMinimizer } from
|
|
366
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
367
|
+
import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
|
|
369
368
|
|
|
370
369
|
export default defineConfig({
|
|
371
370
|
plugins: [pluginCssMinimizer()],
|
|
372
|
-
})
|
|
371
|
+
})
|
|
373
372
|
```
|
|
374
373
|
|
|
375
374
|
### Patch Changes
|
|
@@ -449,18 +448,18 @@
|
|
|
449
448
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
450
449
|
|
|
451
450
|
```js
|
|
452
|
-
import { pluginReactLynx } from
|
|
453
|
-
import { defineConfig } from
|
|
451
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
|
|
452
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
454
453
|
|
|
455
454
|
export default defineConfig({
|
|
456
455
|
plugins: [
|
|
457
456
|
pluginReactLynx({
|
|
458
457
|
defineDCE: {
|
|
459
|
-
__SOME_FALSE_DEFINE__:
|
|
458
|
+
__SOME_FALSE_DEFINE__: 'false',
|
|
460
459
|
},
|
|
461
460
|
}),
|
|
462
461
|
],
|
|
463
|
-
})
|
|
462
|
+
})
|
|
464
463
|
```
|
|
465
464
|
|
|
466
465
|
Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
|
|
@@ -468,20 +467,20 @@
|
|
|
468
467
|
For example, `import` initialized by dead code will be removed:
|
|
469
468
|
|
|
470
469
|
```js
|
|
471
|
-
import { foo } from
|
|
470
|
+
import { foo } from 'bar'
|
|
472
471
|
|
|
473
472
|
if (__SOME_FALSE_DEFINE__) {
|
|
474
|
-
foo()
|
|
475
|
-
console.log(
|
|
473
|
+
foo()
|
|
474
|
+
console.log('dead code')
|
|
476
475
|
} else {
|
|
477
|
-
console.log(
|
|
476
|
+
console.log('reachable code')
|
|
478
477
|
}
|
|
479
478
|
```
|
|
480
479
|
|
|
481
480
|
will be transformed to:
|
|
482
481
|
|
|
483
482
|
```js
|
|
484
|
-
console.log(
|
|
483
|
+
console.log('reachable code')
|
|
485
484
|
```
|
|
486
485
|
|
|
487
486
|
- Updated dependencies [8dd6cca]
|
|
@@ -524,18 +523,18 @@
|
|
|
524
523
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
525
524
|
|
|
526
525
|
```js
|
|
527
|
-
import { pluginReactLynx } from
|
|
528
|
-
import { defineConfig } from
|
|
526
|
+
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
|
|
527
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
529
528
|
|
|
530
529
|
export default defineConfig({
|
|
531
530
|
plugins: [
|
|
532
531
|
pluginReactLynx({
|
|
533
532
|
compat: {
|
|
534
|
-
removeComponentAttrRegex:
|
|
533
|
+
removeComponentAttrRegex: 'YOUR REGEX',
|
|
535
534
|
},
|
|
536
535
|
}),
|
|
537
536
|
],
|
|
538
|
-
})
|
|
537
|
+
})
|
|
539
538
|
```
|
|
540
539
|
|
|
541
540
|
NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
|
|
@@ -554,11 +553,11 @@
|
|
|
554
553
|
|
|
555
554
|
```javascript
|
|
556
555
|
// bar.ts
|
|
557
|
-
import
|
|
556
|
+
import 'background-only'
|
|
558
557
|
|
|
559
558
|
export const bar = () => {
|
|
560
|
-
return
|
|
561
|
-
}
|
|
559
|
+
return 'bar'
|
|
560
|
+
}
|
|
562
561
|
```
|
|
563
562
|
|
|
564
563
|
If `bar` is called in `main-thread`, build time error will be triggered.
|
|
@@ -567,15 +566,15 @@
|
|
|
567
566
|
|
|
568
567
|
```tsx
|
|
569
568
|
// App.tsx
|
|
570
|
-
import { bar } from
|
|
569
|
+
import { bar } from './bar.js'
|
|
571
570
|
|
|
572
571
|
function App() {
|
|
573
|
-
bar()
|
|
572
|
+
bar()
|
|
574
573
|
return (
|
|
575
574
|
<view>
|
|
576
575
|
<text>Hello, Lynx x rspeedy</text>
|
|
577
576
|
</view>
|
|
578
|
-
)
|
|
577
|
+
)
|
|
579
578
|
}
|
|
580
579
|
```
|
|
581
580
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin-canary",
|
|
3
|
-
"version": "0.10.4
|
|
3
|
+
"version": "0.10.4",
|
|
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.0
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.4
|
|
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.4",
|
|
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.16
|
|
38
|
+
"@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.16",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.1",
|
|
40
|
-
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.8.0
|
|
40
|
+
"@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.8.0",
|
|
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": "^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.110.0",
|
|
57
58
|
"@lynx-js/react-transform": "0.2.0",
|
|
58
59
|
"@lynx-js/vitest-setup": "0.0.0",
|
|
59
|
-
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.9.10
|
|
60
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.110.0-canary-20250620-57c33046"
|
|
60
|
+
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.9.10"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@lynx-js/react": "*"
|