@lynx-js/react-rsbuild-plugin-canary 0.10.10 → 0.10.11-canary-20250809-c8ce6aa3
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 +47 -36
- package/dist/{525.js → 860.js} +1 -1
- package/dist/index.js +8 -8
- package/package.json +7 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.10.11-canary-20250809042721-c8ce6aa33abf42a7954e1e345b3a36febe76d048
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`e30b8fe`](https://github.com/lynx-family/lynx-stack/commit/e30b8fef112a87f0ad2c85a80429e30d8c463c91), [`7404483`](https://github.com/lynx-family/lynx-stack/commit/740448376edaa83fed817c1085453ccab24fcb7e), [`23ccb2e`](https://github.com/lynx-family/lynx-stack/commit/23ccb2e263e53d2a15b853819172efdc4e0c2d6d), [`bc1c452`](https://github.com/lynx-family/lynx-stack/commit/bc1c452c504db6d8a6873c587c0818a94fb5f35a), [`20783eb`](https://github.com/lynx-family/lynx-stack/commit/20783ebff96d301c6d9538b382f2b634ecec95d6), [`c8ce6aa`](https://github.com/lynx-family/lynx-stack/commit/c8ce6aa33abf42a7954e1e345b3a36febe76d048), [`5378779`](https://github.com/lynx-family/lynx-stack/commit/537877926592984f349994147a4ae5ad36cdcb6a)]:
|
|
8
|
+
- @lynx-js/react@0.112.2-canary-20250809042721-c8ce6aa33abf42a7954e1e345b3a36febe76d048
|
|
9
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.10.11-canary-20250809042721-c8ce6aa33abf42a7954e1e345b3a36febe76d048
|
|
10
|
+
- @lynx-js/use-sync-external-store@1.5.0
|
|
11
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.4
|
|
12
|
+
- @lynx-js/react-webpack-plugin@0.6.19
|
|
13
|
+
|
|
3
14
|
## 0.10.10
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -78,28 +89,28 @@
|
|
|
78
89
|
|
|
79
90
|
```ts
|
|
80
91
|
type InlineChunkTestFunction = (params: {
|
|
81
|
-
size: number
|
|
82
|
-
name: string
|
|
83
|
-
}) => boolean
|
|
92
|
+
size: number;
|
|
93
|
+
name: string;
|
|
94
|
+
}) => boolean;
|
|
84
95
|
|
|
85
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
96
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
86
97
|
|
|
87
98
|
type InlineChunkConfig =
|
|
88
99
|
| boolean
|
|
89
100
|
| InlineChunkTest
|
|
90
|
-
| { enable?: boolean |
|
|
101
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
91
102
|
```
|
|
92
103
|
|
|
93
104
|
```ts
|
|
94
|
-
import { defineConfig } from
|
|
105
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
95
106
|
|
|
96
107
|
export default defineConfig({
|
|
97
108
|
output: {
|
|
98
109
|
inlineScripts: ({ name, size }) => {
|
|
99
|
-
return name.includes(
|
|
110
|
+
return name.includes("foo") && size < 1000;
|
|
100
111
|
},
|
|
101
112
|
},
|
|
102
|
-
})
|
|
113
|
+
});
|
|
103
114
|
```
|
|
104
115
|
|
|
105
116
|
- 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)]:
|
|
@@ -179,13 +190,13 @@
|
|
|
179
190
|
example:
|
|
180
191
|
|
|
181
192
|
```js
|
|
182
|
-
import { defineConfig } from
|
|
193
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
183
194
|
|
|
184
195
|
export default defineConfig({
|
|
185
196
|
output: {
|
|
186
197
|
inlineScripts: false,
|
|
187
198
|
},
|
|
188
|
-
})
|
|
199
|
+
});
|
|
189
200
|
```
|
|
190
201
|
|
|
191
202
|
- Support `@lynx-js/react` v0.109.0. ([#840](https://github.com/lynx-family/lynx-stack/pull/840))
|
|
@@ -272,7 +283,7 @@
|
|
|
272
283
|
Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
|
|
273
284
|
|
|
274
285
|
```js
|
|
275
|
-
import { defineConfig } from
|
|
286
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
276
287
|
|
|
277
288
|
export default defineConfig({
|
|
278
289
|
tools: {
|
|
@@ -284,7 +295,7 @@
|
|
|
284
295
|
},
|
|
285
296
|
},
|
|
286
297
|
},
|
|
287
|
-
})
|
|
298
|
+
});
|
|
288
299
|
```
|
|
289
300
|
|
|
290
301
|
- Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
|
|
@@ -460,7 +471,7 @@
|
|
|
460
471
|
You may turn it off using `output.minify.css: false`:
|
|
461
472
|
|
|
462
473
|
```js
|
|
463
|
-
import { defineConfig } from
|
|
474
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
464
475
|
|
|
465
476
|
export default defineConfig({
|
|
466
477
|
output: {
|
|
@@ -468,18 +479,18 @@
|
|
|
468
479
|
css: false,
|
|
469
480
|
},
|
|
470
481
|
},
|
|
471
|
-
})
|
|
482
|
+
});
|
|
472
483
|
```
|
|
473
484
|
|
|
474
485
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
475
486
|
|
|
476
487
|
```js
|
|
477
|
-
import { defineConfig } from
|
|
478
|
-
import { pluginCssMinimizer } from
|
|
488
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
489
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
479
490
|
|
|
480
491
|
export default defineConfig({
|
|
481
492
|
plugins: [pluginCssMinimizer()],
|
|
482
|
-
})
|
|
493
|
+
});
|
|
483
494
|
```
|
|
484
495
|
|
|
485
496
|
### Patch Changes
|
|
@@ -559,18 +570,18 @@
|
|
|
559
570
|
- e8039f2: Add `defineDCE` in plugin options. Often used to define custom macros.
|
|
560
571
|
|
|
561
572
|
```js
|
|
562
|
-
import { pluginReactLynx } from
|
|
563
|
-
import { defineConfig } from
|
|
573
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
574
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
564
575
|
|
|
565
576
|
export default defineConfig({
|
|
566
577
|
plugins: [
|
|
567
578
|
pluginReactLynx({
|
|
568
579
|
defineDCE: {
|
|
569
|
-
__SOME_FALSE_DEFINE__:
|
|
580
|
+
__SOME_FALSE_DEFINE__: "false",
|
|
570
581
|
},
|
|
571
582
|
}),
|
|
572
583
|
],
|
|
573
|
-
})
|
|
584
|
+
});
|
|
574
585
|
```
|
|
575
586
|
|
|
576
587
|
Different from `define` provided by bundlers like webpack, `defineDCE` works at transform time and a extra DCE (Dead Code Elimination) pass will be performed.
|
|
@@ -578,20 +589,20 @@
|
|
|
578
589
|
For example, `import` initialized by dead code will be removed:
|
|
579
590
|
|
|
580
591
|
```js
|
|
581
|
-
import { foo } from
|
|
592
|
+
import { foo } from "bar";
|
|
582
593
|
|
|
583
594
|
if (__SOME_FALSE_DEFINE__) {
|
|
584
|
-
foo()
|
|
585
|
-
console.log(
|
|
595
|
+
foo();
|
|
596
|
+
console.log("dead code");
|
|
586
597
|
} else {
|
|
587
|
-
console.log(
|
|
598
|
+
console.log("reachable code");
|
|
588
599
|
}
|
|
589
600
|
```
|
|
590
601
|
|
|
591
602
|
will be transformed to:
|
|
592
603
|
|
|
593
604
|
```js
|
|
594
|
-
console.log(
|
|
605
|
+
console.log("reachable code");
|
|
595
606
|
```
|
|
596
607
|
|
|
597
608
|
- Updated dependencies [8dd6cca]
|
|
@@ -634,18 +645,18 @@
|
|
|
634
645
|
- a30c83d: Add `compat.removeComponentAttrRegex`.
|
|
635
646
|
|
|
636
647
|
```js
|
|
637
|
-
import { pluginReactLynx } from
|
|
638
|
-
import { defineConfig } from
|
|
648
|
+
import { pluginReactLynx } from "@lynx-js/react-rsbuild-plugin";
|
|
649
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
639
650
|
|
|
640
651
|
export default defineConfig({
|
|
641
652
|
plugins: [
|
|
642
653
|
pluginReactLynx({
|
|
643
654
|
compat: {
|
|
644
|
-
removeComponentAttrRegex:
|
|
655
|
+
removeComponentAttrRegex: "YOUR REGEX",
|
|
645
656
|
},
|
|
646
657
|
}),
|
|
647
658
|
],
|
|
648
|
-
})
|
|
659
|
+
});
|
|
649
660
|
```
|
|
650
661
|
|
|
651
662
|
NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
|
|
@@ -664,11 +675,11 @@
|
|
|
664
675
|
|
|
665
676
|
```javascript
|
|
666
677
|
// bar.ts
|
|
667
|
-
import
|
|
678
|
+
import "background-only";
|
|
668
679
|
|
|
669
680
|
export const bar = () => {
|
|
670
|
-
return
|
|
671
|
-
}
|
|
681
|
+
return "bar";
|
|
682
|
+
};
|
|
672
683
|
```
|
|
673
684
|
|
|
674
685
|
If `bar` is called in `main-thread`, build time error will be triggered.
|
|
@@ -677,15 +688,15 @@
|
|
|
677
688
|
|
|
678
689
|
```tsx
|
|
679
690
|
// App.tsx
|
|
680
|
-
import { bar } from
|
|
691
|
+
import { bar } from "./bar.js";
|
|
681
692
|
|
|
682
693
|
function App() {
|
|
683
|
-
bar()
|
|
694
|
+
bar();
|
|
684
695
|
return (
|
|
685
696
|
<view>
|
|
686
697
|
<text>Hello, Lynx x rspeedy</text>
|
|
687
698
|
</view>
|
|
688
|
-
)
|
|
699
|
+
);
|
|
689
700
|
}
|
|
690
701
|
```
|
|
691
702
|
|
package/dist/{525.js → 860.js}
RENAMED
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.6.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.6.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.6.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.6.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
|
|
@@ -190,7 +190,7 @@ const ALIAS_BACKGROUND_ONLY_BACKGROUND = 'react:alias-background-only-background
|
|
|
190
190
|
function applyBackgroundOnly(api) {
|
|
191
191
|
api.modifyBundlerChain(async (chain)=>{
|
|
192
192
|
const __dirname = external_node_path_["default"].dirname((0, external_node_url_.fileURLToPath)(import.meta.url));
|
|
193
|
-
const { resolve, resolveMainThread } = await __webpack_require__.e("
|
|
193
|
+
const { resolve, resolveMainThread } = await __webpack_require__.e("860").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
|
|
194
194
|
const [backgroundOnly, backgroundOnlyMainThread] = await Promise.all([
|
|
195
195
|
resolve('background-only'),
|
|
196
196
|
resolveMainThread('background-only')
|
|
@@ -599,7 +599,7 @@ function applySWC(api) {
|
|
|
599
599
|
}
|
|
600
600
|
function applyUseSyncExternalStore(api) {
|
|
601
601
|
api.modifyBundlerChain(async (chain)=>{
|
|
602
|
-
const { resolve } = await __webpack_require__.e("
|
|
602
|
+
const { resolve } = await __webpack_require__.e("860").then(__webpack_require__.bind(__webpack_require__, "./src/resolve.ts"));
|
|
603
603
|
const useSyncExternalStoreEntries = [
|
|
604
604
|
'use-sync-external-store',
|
|
605
605
|
'use-sync-external-store/with-selector',
|
|
@@ -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.6.1_typescript@5.9.2/node_modules/typia/lib/internal/_accessExpressionAsString.js");
|
|
615
|
+
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.6.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.11-canary-20250809-c8ce6aa3",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.6.1",
|
|
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.11-canary-20250809-c8ce6aa3",
|
|
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",
|
|
@@ -44,20 +44,18 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@microsoft/api-extractor": "7.52.10",
|
|
46
46
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
47
|
-
"@rsbuild/core": "1.4.
|
|
47
|
+
"@rsbuild/core": "1.4.15",
|
|
48
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
|
-
"@rsbuild/webpack": "1.3.2",
|
|
52
|
-
"@samchon/openapi": "4.3.2",
|
|
53
51
|
"tailwindcss": "^3.4.17",
|
|
54
52
|
"type-fest": "^4.41.0",
|
|
55
|
-
"typia": "9.
|
|
56
|
-
"typia-rspack-plugin": "2.
|
|
57
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.112.1",
|
|
53
|
+
"typia": "9.6.1",
|
|
54
|
+
"typia-rspack-plugin": "2.2.0",
|
|
58
55
|
"@lynx-js/react-transform": "0.2.0",
|
|
56
|
+
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.10.6-canary-20250809-c8ce6aa3",
|
|
59
57
|
"@lynx-js/vitest-setup": "0.0.0",
|
|
60
|
-
"@lynx-js/
|
|
58
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.112.2-canary-20250809-c8ce6aa3"
|
|
61
59
|
},
|
|
62
60
|
"peerDependencies": {
|
|
63
61
|
"@lynx-js/react": "*"
|