@lynx-js/react-rsbuild-plugin 0.9.2 → 0.9.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 CHANGED
@@ -1,5 +1,38 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.9.4
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: add extractStr option to pluginReactLynx ([#391](https://github.com/lynx-family/lynx-stack/pull/391))
8
+
9
+ - Convert background-only files from js to ts ([#346](https://github.com/lynx-family/lynx-stack/pull/346))
10
+
11
+ - Updated dependencies [[`f849117`](https://github.com/lynx-family/lynx-stack/commit/f84911731faa4d0f6373d1202b9b2cabb0bafc48), [`d730101`](https://github.com/lynx-family/lynx-stack/commit/d7301017a383b8825cdc813a649ef26ce1c37641), [`42217c2`](https://github.com/lynx-family/lynx-stack/commit/42217c2c77a33e729977fc7108b218a1cb868e6a), [`f03bd4a`](https://github.com/lynx-family/lynx-stack/commit/f03bd4a62f81902ba55caf10df56447c89743e62)]:
12
+ - @lynx-js/react-webpack-plugin@0.6.10
13
+ - @lynx-js/template-webpack-plugin@0.6.7
14
+ - @lynx-js/react-alias-rsbuild-plugin@0.9.4
15
+ - @lynx-js/react-refresh-webpack-plugin@0.3.2
16
+ - @lynx-js/css-extract-webpack-plugin@0.5.2
17
+ - @lynx-js/web-webpack-plugin@0.6.3
18
+
19
+ ## 0.9.3
20
+
21
+ ### Patch Changes
22
+
23
+ - Support `@lynx-js/react` v0.106.0. ([#239](https://github.com/lynx-family/lynx-stack/pull/239))
24
+
25
+ - 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))
26
+
27
+ - 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)]:
28
+ - @lynx-js/template-webpack-plugin@0.6.6
29
+ - @lynx-js/react-webpack-plugin@0.6.9
30
+ - @lynx-js/runtime-wrapper-webpack-plugin@0.0.9
31
+ - @lynx-js/web-webpack-plugin@0.6.3
32
+ - @lynx-js/react-alias-rsbuild-plugin@0.9.3
33
+ - @lynx-js/css-extract-webpack-plugin@0.5.2
34
+ - @lynx-js/react-refresh-webpack-plugin@0.3.2
35
+
3
36
  ## 0.9.2
4
37
 
5
38
  ### Patch Changes
@@ -294,7 +327,7 @@
294
327
  })
295
328
  ```
296
329
 
297
- NOTE: This feature is deprecated and will be removed in the future. Use codemod instead.
330
+ NOTE: This feature is deprecated and will be removed in the future. Use CodeMod instead.
298
331
 
299
332
  - 5f8d492: **BREAKING CHANGE**: Require `@lynx-js/react` v0.103.0.
300
333
  - 5f8d492: Deprecate `compat.simplifyCtorLikeReactLynx2`
@@ -396,9 +429,9 @@
396
429
 
397
430
  ### Minor Changes
398
431
 
399
- - 91c267b: feat: enable auto publicpath for environment.web
432
+ - 91c267b: feat: enable auto `publicPath` for environment.web
400
433
 
401
- In many case, users cannot set a correct assertprefix configuration. Typically those chunks will be uploaded after chunk dumped. Developers may be not able to know the url before those chunks are uploaded.
434
+ In many case, users cannot set a correct `output.assertPrefix` configuration. Typically those chunks will be uploaded after chunk dumped. Developers may be not able to know the url before those chunks are uploaded.
402
435
 
403
436
  In this commit, we allow webpack to infer the correct public path by the import.meta.url.
404
437
 
package/README.md CHANGED
@@ -40,7 +40,7 @@ Visit [Lynx Website](https://lynxjs.org/api/rspeedy/react-rsbuild-plugin.pluginr
40
40
 
41
41
  ## Contributing
42
42
 
43
- Contributions to Rspeedy are welcome and highly appreciated. However, before you jump right into it, we would like you to review our [Contribution Guidelines](/contributing.md) to make sure you have a smooth experience contributing to this project.
43
+ Contributions to Rspeedy are welcome and highly appreciated. However, before you jump right into it, we would like you to review our [Contribution Guidelines](/CONTRIBUTING.md) to make sure you have a smooth experience contributing to this project.
44
44
 
45
45
  ## License
46
46
 
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
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";
@@ -57,10 +57,8 @@ var __webpack_modules__ = {
57
57
  exports._assertGuard = void 0;
58
58
  const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@7.6.4_@samchon+openapi@2.4.2_typescript@5.7.3/node_modules/typia/lib/TypeGuardError.mjs");
59
59
  const _assertGuard = (exceptionable, props, factory)=>{
60
- if (true === exceptionable) {
61
- if (factory) throw factory(props);
62
- throw new TypeGuardError_1.TypeGuardError(props);
63
- }
60
+ if (true === exceptionable) if (factory) throw factory(props);
61
+ else throw new TypeGuardError_1.TypeGuardError(props);
64
62
  return false;
65
63
  };
66
64
  exports._assertGuard = _assertGuard;
@@ -211,7 +209,7 @@ const DEFAULT_DIST_PATH_INTERMEDIATE = '.rspeedy';
211
209
  const DEFAULT_FILENAME_HASH = '.[contenthash:8]';
212
210
  const EMPTY_HASH = '';
213
211
  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;
212
+ const { compat, customCSSInheritanceList, debugInfoOutside, defaultDisplayLinear, enableAccessibilityElement, enableICU, enableCSSInheritance, enableCSSInvalidation, enableCSSSelector, enableNewGesture, enableParallelElement, enableRemoveCSSScope, firstScreenSyncTiming, enableSSR, pipelineSchedulerConfig, removeDescendantSelectorScope, targetSdkVersion, extractStr, experimental_isLazyBundle } = options;
215
213
  const { config } = api.useExposed(Symbol.for('rspeedy.api'));
216
214
  api.modifyBundlerChain((chain, { environment, isDev, isProd })=>{
217
215
  const entries = chain.entryPoints.entries() ?? {};
@@ -302,7 +300,9 @@ function applyEntry(api, options) {
302
300
  {
303
301
  disableCreateSelectorQueryIncompatibleWarning: compat?.disableCreateSelectorQueryIncompatibleWarning ?? false,
304
302
  firstScreenSyncTiming,
303
+ enableSSR,
305
304
  mainThreadChunks,
305
+ extractStr,
306
306
  experimental_isLazyBundle
307
307
  }
308
308
  ]);
@@ -325,10 +325,8 @@ function getChunks(entryName, entryValue) {
325
325
  const { dependOn } = item;
326
326
  if (Array.isArray(item.import)) imports.push(...item.import);
327
327
  else imports.push(item.import);
328
- if (!!dependOn) {
329
- if ('string' == typeof dependOn) chunks.unshift(dependOn);
330
- else chunks.unshift(...dependOn);
331
- }
328
+ if (dependOn) if ('string' == typeof dependOn) chunks.unshift(dependOn);
329
+ else chunks.unshift(...dependOn);
332
330
  }
333
331
  return {
334
332
  chunks,
@@ -480,7 +478,7 @@ function applySWC(api) {
480
478
  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
479
  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
480
  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)=>{
481
+ 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) && null !== input.extractStr && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || "object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) && _io8(input.extractStr, _exceptionable)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
484
482
  if ([
485
483
  "compat",
486
484
  "customCSSInheritanceList",
@@ -495,6 +493,7 @@ const validateConfig = (()=>{
495
493
  "enableParallelElement",
496
494
  "enableRemoveCSSScope",
497
495
  "firstScreenSyncTiming",
496
+ "enableSSR",
498
497
  "jsx",
499
498
  "pipelineSchedulerConfig",
500
499
  "removeDescendantSelectorScope",
@@ -502,6 +501,7 @@ const validateConfig = (()=>{
502
501
  "defineDCE",
503
502
  "engineVersion",
504
503
  "targetSdkVersion",
504
+ "extractStr",
505
505
  "experimental_isLazyBundle"
506
506
  ].some((prop)=>key === prop)) return true;
507
507
  const value = input[key];
@@ -575,6 +575,14 @@ const validateConfig = (()=>{
575
575
  if (void 0 === value) return true;
576
576
  return "string" == typeof value;
577
577
  });
578
+ const _io8 = (input, _exceptionable = true)=>(void 0 === input.strLength || "number" == typeof input.strLength) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
579
+ if ([
580
+ "strLength"
581
+ ].some((prop)=>key === prop)) return true;
582
+ const value = input[key];
583
+ if (void 0 === value) return true;
584
+ return false;
585
+ }));
578
586
  const _ao0 = (input, _path, _exceptionable = true)=>(void 0 === input.compat || ("object" == typeof input.compat && null !== input.compat && false === Array.isArray(input.compat) || _assertGuard._assertGuard(_exceptionable, {
579
587
  method: "typia.createAssertEquals",
580
588
  path: _path + ".compat",
@@ -655,6 +663,11 @@ const validateConfig = (()=>{
655
663
  path: _path + ".firstScreenSyncTiming",
656
664
  expected: "(\"immediately\" | \"jsReady\" | undefined)",
657
665
  value: input.firstScreenSyncTiming
666
+ }, _errorFactory)) && (void 0 === input.enableSSR || "boolean" == typeof input.enableSSR || _assertGuard._assertGuard(_exceptionable, {
667
+ method: "typia.createAssertEquals",
668
+ path: _path + ".enableSSR",
669
+ expected: "(boolean | undefined)",
670
+ value: input.enableSSR
658
671
  }, _errorFactory)) && (void 0 === input.jsx || ("object" == typeof input.jsx && null !== input.jsx && false === Array.isArray(input.jsx) || _assertGuard._assertGuard(_exceptionable, {
659
672
  method: "typia.createAssertEquals",
660
673
  path: _path + ".jsx",
@@ -705,6 +718,21 @@ const validateConfig = (()=>{
705
718
  path: _path + ".targetSdkVersion",
706
719
  expected: "(string | undefined)",
707
720
  value: input.targetSdkVersion
721
+ }, _errorFactory)) && (null !== input.extractStr || _assertGuard._assertGuard(_exceptionable, {
722
+ method: "typia.createAssertEquals",
723
+ path: _path + ".extractStr",
724
+ expected: "(Partial<ExtractStrConfig> | boolean | undefined)",
725
+ value: input.extractStr
726
+ }, _errorFactory)) && (void 0 === input.extractStr || "boolean" == typeof input.extractStr || ("object" == typeof input.extractStr && null !== input.extractStr && false === Array.isArray(input.extractStr) || _assertGuard._assertGuard(_exceptionable, {
727
+ method: "typia.createAssertEquals",
728
+ path: _path + ".extractStr",
729
+ expected: "(Partial<ExtractStrConfig> | boolean | undefined)",
730
+ value: input.extractStr
731
+ }, _errorFactory)) && _ao8(input.extractStr, _path + ".extractStr", _exceptionable) || _assertGuard._assertGuard(_exceptionable, {
732
+ method: "typia.createAssertEquals",
733
+ path: _path + ".extractStr",
734
+ expected: "(Partial<ExtractStrConfig> | boolean | undefined)",
735
+ value: input.extractStr
708
736
  }, _errorFactory)) && (void 0 === input.experimental_isLazyBundle || "boolean" == typeof input.experimental_isLazyBundle || _assertGuard._assertGuard(_exceptionable, {
709
737
  method: "typia.createAssertEquals",
710
738
  path: _path + ".experimental_isLazyBundle",
@@ -725,6 +753,7 @@ const validateConfig = (()=>{
725
753
  "enableParallelElement",
726
754
  "enableRemoveCSSScope",
727
755
  "firstScreenSyncTiming",
756
+ "enableSSR",
728
757
  "jsx",
729
758
  "pipelineSchedulerConfig",
730
759
  "removeDescendantSelectorScope",
@@ -732,6 +761,7 @@ const validateConfig = (()=>{
732
761
  "defineDCE",
733
762
  "engineVersion",
734
763
  "targetSdkVersion",
764
+ "extractStr",
735
765
  "experimental_isLazyBundle"
736
766
  ].some((prop)=>key === prop)) return true;
737
767
  const value = input[key];
@@ -1030,6 +1060,24 @@ const validateConfig = (()=>{
1030
1060
  value: value
1031
1061
  }, _errorFactory);
1032
1062
  });
1063
+ const _ao8 = (input, _path, _exceptionable = true)=>(void 0 === input.strLength || "number" == typeof input.strLength || _assertGuard._assertGuard(_exceptionable, {
1064
+ method: "typia.createAssertEquals",
1065
+ path: _path + ".strLength",
1066
+ expected: "(number | undefined)",
1067
+ value: input.strLength
1068
+ }, _errorFactory)) && (0 === Object.keys(input).length || false === _exceptionable || Object.keys(input).every((key)=>{
1069
+ if ([
1070
+ "strLength"
1071
+ ].some((prop)=>key === prop)) return true;
1072
+ const value = input[key];
1073
+ if (void 0 === value) return true;
1074
+ return _assertGuard._assertGuard(_exceptionable, {
1075
+ method: "typia.createAssertEquals",
1076
+ path: _path + _accessExpressionAsString._accessExpressionAsString(key),
1077
+ expected: "undefined",
1078
+ value: value
1079
+ }, _errorFactory);
1080
+ }));
1033
1081
  const __is = (input, _exceptionable = true)=>void 0 === input || "object" == typeof input && null !== input && false === Array.isArray(input) && _io0(input, true);
1034
1082
  let _errorFactory;
1035
1083
  return (input, errorFactory = ({ path, expected, value })=>{
@@ -1081,6 +1129,7 @@ function pluginReactLynx(userOptions) {
1081
1129
  enableParallelElement: true,
1082
1130
  enableRemoveCSSScope: true,
1083
1131
  firstScreenSyncTiming: 'immediately',
1132
+ enableSSR: false,
1084
1133
  jsx: void 0,
1085
1134
  pipelineSchedulerConfig: 0x00010000,
1086
1135
  removeDescendantSelectorScope: true,
@@ -1088,6 +1137,7 @@ function pluginReactLynx(userOptions) {
1088
1137
  defineDCE: void 0,
1089
1138
  targetSdkVersion: '',
1090
1139
  engineVersion: '',
1140
+ extractStr: false,
1091
1141
  experimental_isLazyBundle: false
1092
1142
  };
1093
1143
  const resolvedOptions = Object.assign(defaultOptions, userOptions, {
@@ -1109,13 +1159,6 @@ function pluginReactLynx(userOptions) {
1109
1159
  applySplitChunksRule(api);
1110
1160
  applySWC(api);
1111
1161
  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
1162
  const userConfig = api.getRsbuildConfig('original');
1120
1163
  if (void 0 === userConfig.source?.include) return mergeRsbuildConfig(config, {
1121
1164
  source: {
@@ -0,0 +1,4 @@
1
+ import type { Rspack } from '@rsbuild/core';
2
+ export default function invalidImportErrorLoader(this: Rspack.LoaderContext<{
3
+ message: string;
4
+ }>): void;
@@ -1,4 +1,5 @@
1
- export default function invalidImportErrorLoader() {
1
+ function invalidImportErrorLoader() {
2
2
  const { message } = this.getOptions();
3
3
  throw new Error(message);
4
4
  }
5
+ export { invalidImportErrorLoader as default };
@@ -1,5 +1,6 @@
1
1
  import type { RsbuildPlugin } from '@rsbuild/core';
2
2
  import type { CompatVisitorConfig, DefineDceVisitorConfig, JsxTransformerConfig, ShakeVisitorConfig } from '@lynx-js/react/transform';
3
+ import type { ExtractStrConfig } from '@lynx-js/react-webpack-plugin';
3
4
  /**
4
5
  * Options of {@link pluginReactLynx}
5
6
  *
@@ -179,6 +180,14 @@ export interface PluginReactLynxOptions {
179
180
  * @defaultValue "immediately"
180
181
  */
181
182
  firstScreenSyncTiming?: 'immediately' | 'jsReady';
183
+ /**
184
+ * `enableSSR` enable Lynx SSR feature for this build.
185
+ *
186
+ * @defaultValue `false`
187
+ *
188
+ * @public
189
+ */
190
+ enableSSR?: boolean;
182
191
  /**
183
192
  * The `jsx` option controls how JSX is transformed.
184
193
  */
@@ -232,6 +241,13 @@ export interface PluginReactLynxOptions {
232
241
  * @deprecated `targetSdkVersion` is now an alias of {@link PluginReactLynxOptions.engineVersion}. Use {@link PluginReactLynxOptions.engineVersion} instead.
233
242
  */
234
243
  targetSdkVersion?: string;
244
+ /**
245
+ * Merge same string literals in JS and Lepus to reduce output bundle size.
246
+ * Set to `false` to disable.
247
+ *
248
+ * @defaultValue false
249
+ */
250
+ extractStr?: Partial<ExtractStrConfig> | boolean;
235
251
  /**
236
252
  * Generate standalone lazy bundle.
237
253
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
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.2",
36
+ "@lynx-js/react-alias-rsbuild-plugin": "0.9.4",
37
37
  "@lynx-js/react-refresh-webpack-plugin": "0.3.2",
38
- "@lynx-js/react-webpack-plugin": "0.6.8",
39
- "@lynx-js/runtime-wrapper-webpack-plugin": "0.0.8",
40
- "@lynx-js/template-webpack-plugin": "0.6.5",
41
- "@lynx-js/web-webpack-plugin": "0.6.2"
38
+ "@lynx-js/react-webpack-plugin": "0.6.10",
39
+ "@lynx-js/runtime-wrapper-webpack-plugin": "0.0.9",
40
+ "@lynx-js/template-webpack-plugin": "0.6.7",
41
+ "@lynx-js/web-webpack-plugin": "0.6.3"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-extractor": "7.51.1",
@@ -49,15 +49,15 @@
49
49
  "@rsbuild/plugin-webpack-swc": "1.0.12",
50
50
  "@rsbuild/webpack": "1.2.3",
51
51
  "tailwindcss": "^3.4.17",
52
- "type-fest": "^4.37.0",
52
+ "type-fest": "^4.38.0",
53
53
  "typia": "7.6.4",
54
54
  "typia-rspack-plugin": "^1.0.2",
55
- "@lynx-js/react": "0.105.2",
56
- "@lynx-js/rspeedy": "0.8.4",
55
+ "@lynx-js/react": "0.106.2",
56
+ "@lynx-js/rspeedy": "0.8.7",
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": {
File without changes
@@ -1 +0,0 @@
1
- throw new Error("This module cannot be imported from a Main Thread module. It should only be used from a Background Thread.");