@lynx-js/react-rsbuild-plugin 0.9.2 → 0.9.3
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 +17 -0
- package/dist/index.js +12 -10
- package/dist/pluginReactLynx.d.ts +8 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @lynx-js/react-rsbuild-plugin
|
|
2
2
|
|
|
3
|
+
## 0.9.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Support `@lynx-js/react` v0.106.0. ([#239](https://github.com/lynx-family/lynx-stack/pull/239))
|
|
8
|
+
|
|
9
|
+
- Fix the issue where the canary version of React was not included in the `rule.include` configuration. ([#275](https://github.com/lynx-family/lynx-stack/pull/275))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`ba26a4d`](https://github.com/lynx-family/lynx-stack/commit/ba26a4db1ec3dcfd445dd834533b3bc10b091686), [`462e97b`](https://github.com/lynx-family/lynx-stack/commit/462e97b28c12b554c0c825c7df453bdf433749ae), [`aa1fbed`](https://github.com/lynx-family/lynx-stack/commit/aa1fbedec8459f8c830467a5b92033e3530dce80), [`d2d55ef`](https://github.com/lynx-family/lynx-stack/commit/d2d55ef9fe438c35921d9db0daa40d5228822ecc), [`6af0396`](https://github.com/lynx-family/lynx-stack/commit/6af039661844f22b65ad1b98db5c7b31df204ae4)]:
|
|
12
|
+
- @lynx-js/template-webpack-plugin@0.6.6
|
|
13
|
+
- @lynx-js/react-webpack-plugin@0.6.9
|
|
14
|
+
- @lynx-js/runtime-wrapper-webpack-plugin@0.0.9
|
|
15
|
+
- @lynx-js/web-webpack-plugin@0.6.3
|
|
16
|
+
- @lynx-js/react-alias-rsbuild-plugin@0.9.3
|
|
17
|
+
- @lynx-js/css-extract-webpack-plugin@0.5.2
|
|
18
|
+
- @lynx-js/react-refresh-webpack-plugin@0.3.2
|
|
19
|
+
|
|
3
20
|
## 0.9.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
3
2
|
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_react_alias_rsbuild_plugin_2a0391db__ from "@lynx-js/react-alias-rsbuild-plugin";
|
|
4
3
|
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__ from "@lynx-js/react-webpack-plugin";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_template_webpack_plugin_e98d2f08__ from "@lynx-js/template-webpack-plugin";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_runtime_wrapper_webpack_plugin_27793081__ from "@lynx-js/runtime-wrapper-webpack-plugin";
|
|
@@ -211,7 +211,7 @@ const DEFAULT_DIST_PATH_INTERMEDIATE = '.rspeedy';
|
|
|
211
211
|
const DEFAULT_FILENAME_HASH = '.[contenthash:8]';
|
|
212
212
|
const EMPTY_HASH = '';
|
|
213
213
|
function applyEntry(api, options) {
|
|
214
|
-
const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableICU, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableParallelElement, enableRemoveCSSScope, firstScreenSyncTiming, pipelineSchedulerConfig, removeDescendantSelectorScope, targetSdkVersion, experimental_isLazyBundle } = options;
|
|
214
|
+
const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableICU, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableParallelElement, enableRemoveCSSScope, firstScreenSyncTiming, enableSSR, pipelineSchedulerConfig, removeDescendantSelectorScope, targetSdkVersion, experimental_isLazyBundle } = options;
|
|
215
215
|
const { config } = api.useExposed(Symbol.for('rspeedy.api'));
|
|
216
216
|
api.modifyBundlerChain((chain, { environment, isDev, isProd })=>{
|
|
217
217
|
const entries = chain.entryPoints.entries() ?? {};
|
|
@@ -302,6 +302,7 @@ function applyEntry(api, options) {
|
|
|
302
302
|
{
|
|
303
303
|
disableCreateSelectorQueryIncompatibleWarning: compat?.disableCreateSelectorQueryIncompatibleWarning ?? false,
|
|
304
304
|
firstScreenSyncTiming,
|
|
305
|
+
enableSSR,
|
|
305
306
|
mainThreadChunks,
|
|
306
307
|
experimental_isLazyBundle
|
|
307
308
|
}
|
|
@@ -480,7 +481,7 @@ function applySWC(api) {
|
|
|
480
481
|
var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@7.6.4_@samchon+openapi@2.4.2_typescript@5.7.3/node_modules/typia/lib/internal/_accessExpressionAsString.js");
|
|
481
482
|
var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@7.6.4_@samchon+openapi@2.4.2_typescript@5.7.3/node_modules/typia/lib/internal/_assertGuard.js");
|
|
482
483
|
const validateConfig = (()=>{
|
|
483
|
-
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.jsx || "object" == typeof input.jsx && null !== input.jsx && false === Array.isArray(input.jsx) && _io4(input.jsx, _exceptionable)) && (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) && _io5(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io6(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
484
|
+
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.jsx || "object" == typeof input.jsx && null !== input.jsx && false === Array.isArray(input.jsx) && _io4(input.jsx, _exceptionable)) && (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) && _io5(input.shake, _exceptionable)) && (void 0 === input.defineDCE || "object" == typeof input.defineDCE && null !== input.defineDCE && false === Array.isArray(input.defineDCE) && _io6(input.defineDCE, _exceptionable)) && (void 0 === input.engineVersion || "string" == typeof input.engineVersion) && (void 0 === input.targetSdkVersion || "string" == typeof input.targetSdkVersion) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
484
485
|
if ([
|
|
485
486
|
"compat",
|
|
486
487
|
"customCSSInheritanceList",
|
|
@@ -495,6 +496,7 @@ const validateConfig = (()=>{
|
|
|
495
496
|
"enableParallelElement",
|
|
496
497
|
"enableRemoveCSSScope",
|
|
497
498
|
"firstScreenSyncTiming",
|
|
499
|
+
"enableSSR",
|
|
498
500
|
"jsx",
|
|
499
501
|
"pipelineSchedulerConfig",
|
|
500
502
|
"removeDescendantSelectorScope",
|
|
@@ -655,6 +657,11 @@ const validateConfig = (()=>{
|
|
|
655
657
|
path: _path + ".firstScreenSyncTiming",
|
|
656
658
|
expected: "(\"immediately\" | \"jsReady\" | undefined)",
|
|
657
659
|
value: input.firstScreenSyncTiming
|
|
660
|
+
}, _errorFactory)) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR || _assertGuard._assertGuard(_exceptionable, {
|
|
661
|
+
method: "typia.createAssertEquals",
|
|
662
|
+
path: _path + ".enableSSR",
|
|
663
|
+
expected: "(boolean | undefined)",
|
|
664
|
+
value: input.enableSSR
|
|
658
665
|
}, _errorFactory)) && (void 0 === input.jsx || ("object" == typeof input.jsx && null !== input.jsx && false === Array.isArray(input.jsx) || _assertGuard._assertGuard(_exceptionable, {
|
|
659
666
|
method: "typia.createAssertEquals",
|
|
660
667
|
path: _path + ".jsx",
|
|
@@ -725,6 +732,7 @@ const validateConfig = (()=>{
|
|
|
725
732
|
"enableParallelElement",
|
|
726
733
|
"enableRemoveCSSScope",
|
|
727
734
|
"firstScreenSyncTiming",
|
|
735
|
+
"enableSSR",
|
|
728
736
|
"jsx",
|
|
729
737
|
"pipelineSchedulerConfig",
|
|
730
738
|
"removeDescendantSelectorScope",
|
|
@@ -1081,6 +1089,7 @@ function pluginReactLynx(userOptions) {
|
|
|
1081
1089
|
enableParallelElement: true,
|
|
1082
1090
|
enableRemoveCSSScope: true,
|
|
1083
1091
|
firstScreenSyncTiming: 'immediately',
|
|
1092
|
+
enableSSR: false,
|
|
1084
1093
|
jsx: void 0,
|
|
1085
1094
|
pipelineSchedulerConfig: 0x00010000,
|
|
1086
1095
|
removeDescendantSelectorScope: true,
|
|
@@ -1109,13 +1118,6 @@ function pluginReactLynx(userOptions) {
|
|
|
1109
1118
|
applySplitChunksRule(api);
|
|
1110
1119
|
applySWC(api);
|
|
1111
1120
|
api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>{
|
|
1112
|
-
config = mergeRsbuildConfig(config, {
|
|
1113
|
-
source: {
|
|
1114
|
-
include: [
|
|
1115
|
-
__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].dirname(require.resolve('@lynx-js/react/package.json'))
|
|
1116
|
-
]
|
|
1117
|
-
}
|
|
1118
|
-
});
|
|
1119
1121
|
const userConfig = api.getRsbuildConfig('original');
|
|
1120
1122
|
if (void 0 === userConfig.source?.include) return mergeRsbuildConfig(config, {
|
|
1121
1123
|
source: {
|
|
@@ -179,6 +179,14 @@ export interface PluginReactLynxOptions {
|
|
|
179
179
|
* @defaultValue "immediately"
|
|
180
180
|
*/
|
|
181
181
|
firstScreenSyncTiming?: 'immediately' | 'jsReady';
|
|
182
|
+
/**
|
|
183
|
+
* `enableSSR` enable Lynx SSR feature for this build.
|
|
184
|
+
*
|
|
185
|
+
* @defaultValue `false`
|
|
186
|
+
*
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
enableSSR?: boolean;
|
|
182
190
|
/**
|
|
183
191
|
* The `jsx` option controls how JSX is transformed.
|
|
184
192
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-rsbuild-plugin",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "A rsbuild plugin for ReactLynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@lynx-js/css-extract-webpack-plugin": "0.5.2",
|
|
36
|
-
"@lynx-js/react-alias-rsbuild-plugin": "0.9.
|
|
36
|
+
"@lynx-js/react-alias-rsbuild-plugin": "0.9.3",
|
|
37
|
+
"@lynx-js/react-webpack-plugin": "0.6.9",
|
|
37
38
|
"@lynx-js/react-refresh-webpack-plugin": "0.3.2",
|
|
38
|
-
"@lynx-js/
|
|
39
|
-
"@lynx-js/
|
|
40
|
-
"@lynx-js/
|
|
41
|
-
"@lynx-js/web-webpack-plugin": "0.6.2"
|
|
39
|
+
"@lynx-js/runtime-wrapper-webpack-plugin": "0.0.9",
|
|
40
|
+
"@lynx-js/template-webpack-plugin": "0.6.6",
|
|
41
|
+
"@lynx-js/web-webpack-plugin": "0.6.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@microsoft/api-extractor": "7.51.1",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"type-fest": "^4.37.0",
|
|
53
53
|
"typia": "7.6.4",
|
|
54
54
|
"typia-rspack-plugin": "^1.0.2",
|
|
55
|
-
"@lynx-js/react": "0.
|
|
56
|
-
"@lynx-js/rspeedy": "0.8.
|
|
55
|
+
"@lynx-js/react": "0.106.0",
|
|
56
|
+
"@lynx-js/rspeedy": "0.8.5",
|
|
57
57
|
"@lynx-js/vitest-setup": "0.0.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@lynx-js/react": "^0.103.0 || ^0.104.0 || ^0.105.0"
|
|
60
|
+
"@lynx-js/react": "^0.103.0 || ^0.104.0 || ^0.105.0 || ^0.106.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependenciesMeta": {
|
|
63
63
|
"@lynx-js/react": {
|