@lynx-js/react-rsbuild-plugin-canary 0.10.11 → 0.10.12-canary-20250812-b391ef5c
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 +45 -36
- package/dist/index.js +6 -6
- package/package.json +9 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.10.12-canary-20250812160117-b391ef5c6dd0a0945e68b38f40807df7e1ef672e
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`b391ef5`](https://github.com/lynx-family/lynx-stack/commit/b391ef5c6dd0a0945e68b38f40807df7e1ef672e)]:
|
|
8
|
+
- @lynx-js/css-extract-webpack-plugin@0.6.2-canary-20250812160117-b391ef5c6dd0a0945e68b38f40807df7e1ef672e
|
|
9
|
+
- @lynx-js/react-webpack-plugin@0.6.19
|
|
10
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.10.12-canary-20250812160117-b391ef5c6dd0a0945e68b38f40807df7e1ef672e
|
|
11
|
+
|
|
3
12
|
## 0.10.11
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -88,28 +97,28 @@
|
|
|
88
97
|
|
|
89
98
|
```ts
|
|
90
99
|
type InlineChunkTestFunction = (params: {
|
|
91
|
-
size: number
|
|
92
|
-
name: string
|
|
93
|
-
}) => boolean
|
|
100
|
+
size: number;
|
|
101
|
+
name: string;
|
|
102
|
+
}) => boolean;
|
|
94
103
|
|
|
95
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
104
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
96
105
|
|
|
97
106
|
type InlineChunkConfig =
|
|
98
107
|
| boolean
|
|
99
108
|
| InlineChunkTest
|
|
100
|
-
| { enable?: boolean |
|
|
109
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
101
110
|
```
|
|
102
111
|
|
|
103
112
|
```ts
|
|
104
|
-
import { defineConfig } from
|
|
113
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
105
114
|
|
|
106
115
|
export default defineConfig({
|
|
107
116
|
output: {
|
|
108
117
|
inlineScripts: ({ name, size }) => {
|
|
109
|
-
return name.includes(
|
|
118
|
+
return name.includes("foo") && size < 1000;
|
|
110
119
|
},
|
|
111
120
|
},
|
|
112
|
-
})
|
|
121
|
+
});
|
|
113
122
|
```
|
|
114
123
|
|
|
115
124
|
- 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)]:
|
|
@@ -189,13 +198,13 @@
|
|
|
189
198
|
example:
|
|
190
199
|
|
|
191
200
|
```js
|
|
192
|
-
import { defineConfig } from
|
|
201
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
193
202
|
|
|
194
203
|
export default defineConfig({
|
|
195
204
|
output: {
|
|
196
205
|
inlineScripts: false,
|
|
197
206
|
},
|
|
198
|
-
})
|
|
207
|
+
});
|
|
199
208
|
```
|
|
200
209
|
|
|
201
210
|
- Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
|
|
@@ -282,7 +291,7 @@
|
|
|
282
291
|
Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
|
|
283
292
|
|
|
284
293
|
```js
|
|
285
|
-
import { defineConfig } from
|
|
294
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
286
295
|
|
|
287
296
|
export default defineConfig({
|
|
288
297
|
tools: {
|
|
@@ -294,7 +303,7 @@
|
|
|
294
303
|
},
|
|
295
304
|
},
|
|
296
305
|
},
|
|
297
|
-
})
|
|
306
|
+
});
|
|
298
307
|
```
|
|
299
308
|
|
|
300
309
|
- Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
|
|
@@ -470,7 +479,7 @@
|
|
|
470
479
|
You may turn it off using `output.minify.css: false`:
|
|
471
480
|
|
|
472
481
|
```js
|
|
473
|
-
import { defineConfig } from
|
|
482
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
474
483
|
|
|
475
484
|
export default defineConfig({
|
|
476
485
|
output: {
|
|
@@ -478,18 +487,18 @@
|
|
|
478
487
|
css: false,
|
|
479
488
|
},
|
|
480
489
|
},
|
|
481
|
-
})
|
|
490
|
+
});
|
|
482
491
|
```
|
|
483
492
|
|
|
484
493
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
485
494
|
|
|
486
495
|
```js
|
|
487
|
-
import { defineConfig } from
|
|
488
|
-
import { pluginCssMinimizer } from
|
|
496
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
497
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
489
498
|
|
|
490
499
|
export default defineConfig({
|
|
491
500
|
plugins: [pluginCssMinimizer()],
|
|
492
|
-
})
|
|
501
|
+
});
|
|
493
502
|
```
|
|
494
503
|
|
|
495
504
|
### Patch Changes
|
|
@@ -569,18 +578,18 @@
|
|
|
569
578
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
570
579
|
|
|
571
580
|
```js
|
|
572
|
-
import { pluginReactLynx } from
|
|
573
|
-
import { defineConfig } from
|
|
581
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
582
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
574
583
|
|
|
575
584
|
export default defineConfig({
|
|
576
585
|
plugins: [
|
|
577
586
|
pluginReactLynx({
|
|
578
587
|
defineDCE: {
|
|
579
|
-
__SOME_FALSE_DEFINE__:
|
|
588
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
580
589
|
},
|
|
581
590
|
}),
|
|
582
591
|
],
|
|
583
|
-
})
|
|
592
|
+
});
|
|
584
593
|
```
|
|
585
594
|
|
|
586
595
|
Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
|
|
@@ -588,20 +597,20 @@
|
|
|
588
597
|
For example, `import` initialized by dead code will be removed:
|
|
589
598
|
|
|
590
599
|
```js
|
|
591
|
-
import { foo } from
|
|
600
|
+
import { foo } from "bar";
|
|
592
601
|
|
|
593
602
|
if (__SOME_FALSE_DEFINE__) {
|
|
594
|
-
foo()
|
|
595
|
-
console.log(
|
|
603
|
+
foo();
|
|
604
|
+
console.log("dead code");
|
|
596
605
|
} else {
|
|
597
|
-
console.log(
|
|
606
|
+
console.log("reachable code");
|
|
598
607
|
}
|
|
599
608
|
```
|
|
600
609
|
|
|
601
610
|
will be transformed to:
|
|
602
611
|
|
|
603
612
|
```js
|
|
604
|
-
console.log(
|
|
613
|
+
console.log("reachable code");
|
|
605
614
|
```
|
|
606
615
|
|
|
607
616
|
- Updated dependencies [8dd6cca]
|
|
@@ -644,18 +653,18 @@
|
|
|
644
653
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
645
654
|
|
|
646
655
|
```js
|
|
647
|
-
import { pluginReactLynx } from
|
|
648
|
-
import { defineConfig } from
|
|
656
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
657
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
649
658
|
|
|
650
659
|
export default defineConfig({
|
|
651
660
|
plugins: [
|
|
652
661
|
pluginReactLynx({
|
|
653
662
|
compat: {
|
|
654
|
-
removeComponentAttrRegex:
|
|
663
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
655
664
|
},
|
|
656
665
|
}),
|
|
657
666
|
],
|
|
658
|
-
})
|
|
667
|
+
});
|
|
659
668
|
```
|
|
660
669
|
|
|
661
670
|
NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
|
|
@@ -674,11 +683,11 @@
|
|
|
674
683
|
|
|
675
684
|
```javascript
|
|
676
685
|
// bar.ts
|
|
677
|
-
import
|
|
686
|
+
import "background-only";
|
|
678
687
|
|
|
679
688
|
export const bar = () => {
|
|
680
|
-
return
|
|
681
|
-
}
|
|
689
|
+
return "bar";
|
|
690
|
+
};
|
|
682
691
|
```
|
|
683
692
|
|
|
684
693
|
If `bar` is called in `main-thread`, build time error will be triggered.
|
|
@@ -687,15 +696,15 @@
|
|
|
687
696
|
|
|
688
697
|
```tsx
|
|
689
698
|
// App.tsx
|
|
690
|
-
import { bar } from
|
|
699
|
+
import { bar } from "./bar.js";
|
|
691
700
|
|
|
692
701
|
function App() {
|
|
693
|
-
bar()
|
|
702
|
+
bar();
|
|
694
703
|
return (
|
|
695
704
|
<view>
|
|
696
705
|
<text>Hello, Lynx x rspeedy</text>
|
|
697
706
|
</view>
|
|
698
|
-
)
|
|
707
|
+
);
|
|
699
708
|
}
|
|
700
709
|
```
|
|
701
710
|
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { CSSPlugins, LynxEncodePlugin, LynxTemplatePlugin, WebEncodePlugin } fro
|
|
|
7
7
|
import { RuntimeWrapperWebpackPlugin } from "@lynx-js/runtime-wrapper-webpack-plugin";
|
|
8
8
|
import { ReactRefreshRspackPlugin, ReactRefreshWebpackPlugin } from "@lynx-js/react-refresh-webpack-plugin";
|
|
9
9
|
var __webpack_modules__ = {
|
|
10
|
-
"../../../node_modules/.pnpm/typia@9.
|
|
10
|
+
"../../../node_modules/.pnpm/typia@9.7.1_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js": function(__unused_webpack_module, exports) {
|
|
11
11
|
exports._accessExpressionAsString = void 0;
|
|
12
12
|
const _accessExpressionAsString = (str)=>variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;
|
|
13
13
|
exports._accessExpressionAsString = _accessExpressionAsString;
|
|
@@ -52,9 +52,9 @@ var __webpack_modules__ = {
|
|
|
52
52
|
"with"
|
|
53
53
|
]);
|
|
54
54
|
},
|
|
55
|
-
"../../../node_modules/.pnpm/typia@9.
|
|
55
|
+
"../../../node_modules/.pnpm/typia@9.7.1_typescript@5.9.2/node_modules/typia/lib/internal/_assertGuard.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
56
56
|
exports._assertGuard = void 0;
|
|
57
|
-
const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.
|
|
57
|
+
const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.1_typescript@5.9.2/node_modules/typia/lib/TypeGuardError.mjs");
|
|
58
58
|
const _assertGuard = (exceptionable, props, factory)=>{
|
|
59
59
|
if (true === exceptionable) if (factory) throw factory(props);
|
|
60
60
|
else throw new TypeGuardError_1.TypeGuardError(props);
|
|
@@ -71,7 +71,7 @@ var __webpack_modules__ = {
|
|
|
71
71
|
"node:url": function(module) {
|
|
72
72
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__;
|
|
73
73
|
},
|
|
74
|
-
"../../../node_modules/.pnpm/typia@9.
|
|
74
|
+
"../../../node_modules/.pnpm/typia@9.7.1_typescript@5.9.2/node_modules/typia/lib/TypeGuardError.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
75
75
|
__webpack_require__.r(__webpack_exports__);
|
|
76
76
|
__webpack_require__.d(__webpack_exports__, {
|
|
77
77
|
TypeGuardError: ()=>TypeGuardError
|
|
@@ -611,8 +611,8 @@ function applyUseSyncExternalStore(api) {
|
|
|
611
611
|
})));
|
|
612
612
|
});
|
|
613
613
|
}
|
|
614
|
-
var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.
|
|
615
|
-
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.
|
|
614
|
+
var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.1_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js");
|
|
615
|
+
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.7.1_typescript@5.9.2/node_modules/typia/lib/internal/_assertGuard.js");
|
|
616
616
|
const validateConfig = (()=>{
|
|
617
617
|
const _io0 = (input, _exceptionable = true)=>(void 0 === input.compat || "object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) && _io1(input.compat, _exceptionable)) && (void 0 === input.customCSSInheritanceList || Array.isArray(input.customCSSInheritanceList) && input.customCSSInheritanceList.every((elem, _index1)=>"string" == typeof elem)) && (void 0 === input.debugInfoOutside || "boolean" == typeof input.debugInfoOutside) && (void 0 === input.defaultDisplayLinear || "boolean" == typeof input.defaultDisplayLinear) && (void 0 === input.enableAccessibilityElement || "boolean" == typeof input.enableAccessibilityElement) && (void 0 === input.enableICU || "boolean" == typeof input.enableICU) && (void 0 === input.enableCSSInheritance || "boolean" == typeof input.enableCSSInheritance) && (void 0 === input.enableCSSInvalidation || "boolean" == typeof input.enableCSSInvalidation) && (void 0 === input.enableCSSSelector || "boolean" == typeof input.enableCSSSelector) && (void 0 === input.enableNewGesture || "boolean" == typeof input.enableNewGesture) && (void 0 === input.enableParallelElement || "boolean" == typeof input.enableParallelElement) && (void 0 === input.enableRemoveCSSScope || "boolean" == typeof input.enableRemoveCSSScope) && (void 0 === input.firstScreenSyncTiming || "immediately" === input.firstScreenSyncTiming || "jsReady" === input.firstScreenSyncTiming) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR) && (void 0 === input.pipelineSchedulerConfig || "number" == typeof input.pipelineSchedulerConfig) && (void 0 === input.removeDescendantSelectorScope || "boolean" == typeof input.removeDescendantSelectorScope) && (void 0 === input.shake || "object" == typeof input.shake && null !== input.shake && false === Array.isArray(input.shake) && _io4(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io5(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io7(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
618
618
|
if ([
|
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.12-canary-20250812-b391ef5c",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -32,8 +32,8 @@
|
|
|
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.
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.
|
|
35
|
+
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.2-canary-20250812-b391ef5c",
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.10.12-canary-20250812-b391ef5c",
|
|
37
37
|
"@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.3.4",
|
|
38
38
|
"@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.6.19",
|
|
39
39
|
"@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.1.2",
|
|
@@ -45,17 +45,16 @@
|
|
|
45
45
|
"@microsoft/api-extractor": "7.52.10",
|
|
46
46
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
47
47
|
"@rsbuild/core": "1.4.15",
|
|
48
|
-
"@rsbuild/plugin-sass": "1.3.
|
|
49
|
-
"@rsbuild/plugin-typed-css-modules": "1.0.
|
|
50
|
-
"@rsbuild/plugin-webpack-swc": "1.1.1",
|
|
48
|
+
"@rsbuild/plugin-sass": "1.3.5",
|
|
49
|
+
"@rsbuild/plugin-typed-css-modules": "1.0.3",
|
|
51
50
|
"tailwindcss": "^3.4.17",
|
|
52
51
|
"type-fest": "^4.41.0",
|
|
53
|
-
"typia": "9.
|
|
54
|
-
"typia-rspack-plugin": "2.2.
|
|
52
|
+
"typia": "9.7.1",
|
|
53
|
+
"typia-rspack-plugin": "2.2.1",
|
|
55
54
|
"@lynx-js/react": "npm:@lynx-js/react-canary@0.112.2",
|
|
56
55
|
"@lynx-js/react-transform": "0.2.0",
|
|
57
|
-
"@lynx-js/
|
|
58
|
-
"@lynx-js/
|
|
56
|
+
"@lynx-js/vitest-setup": "0.0.0",
|
|
57
|
+
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.10.6"
|
|
59
58
|
},
|
|
60
59
|
"peerDependencies": {
|
|
61
60
|
"@lynx-js/react": "*"
|