@lynx-js/react-rsbuild-plugin 0.9.6 → 0.9.8

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,68 @@
1
1
  # @lynx-js/react-rsbuild-plugin
2
2
 
3
+ ## 0.9.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Support @lynx-js/react v0.107.0 ([#438](https://github.com/lynx-family/lynx-stack/pull/438))
8
+
9
+ - fix(web): `:root` not work on web platform ([#607](https://github.com/lynx-family/lynx-stack/pull/607))
10
+
11
+ Note: To solve this issue, you need to upgrade your `react-rsbuild-plugin`
12
+
13
+ - Refactor: Replace built-in `background-only` implementation with npm package ([#602](https://github.com/lynx-family/lynx-stack/pull/602))
14
+
15
+ Previously we maintained custom files:
16
+
17
+ - `empty.ts` for background thread
18
+ - `error.ts` for main thread validation
19
+
20
+ Now adopting the standard `background-only` npm package
21
+
22
+ - fix(web): css selector not work for selectors with combinator and pseudo-class on WEB ([#608](https://github.com/lynx-family/lynx-stack/pull/608))
23
+
24
+ like `.parent > :not([hidden]) ~ :not([hidden])`
25
+
26
+ you will need to upgrade your `react-rsbuild-plugin` to fix this issue
27
+
28
+ - Updated dependencies [[`6a5fc80`](https://github.com/lynx-family/lynx-stack/commit/6a5fc80716e668bacf4ce4ff59c569683ace0ba2), [`06bb78a`](https://github.com/lynx-family/lynx-stack/commit/06bb78a6b93d4a7be7177a6269dd4337852ce90d), [`f3afaf6`](https://github.com/lynx-family/lynx-stack/commit/f3afaf6c7919d3fe60ac2dfcd8af77178436f785), [`bf9c685`](https://github.com/lynx-family/lynx-stack/commit/bf9c68501205b038043e2f315e0a690c8bc46829), [`5269cab`](https://github.com/lynx-family/lynx-stack/commit/5269cabef7609159bdd0dd14a03c5da667907424)]:
29
+ - @lynx-js/react-webpack-plugin@0.6.12
30
+ - @lynx-js/web-webpack-plugin@0.6.6
31
+ - @lynx-js/template-webpack-plugin@0.6.10
32
+ - @lynx-js/react-alias-rsbuild-plugin@0.9.8
33
+ - @lynx-js/react-refresh-webpack-plugin@0.3.2
34
+ - @lynx-js/css-extract-webpack-plugin@0.5.3
35
+
36
+ ## 0.9.7
37
+
38
+ ### Patch Changes
39
+
40
+ - Support overriding SWC configuration. ([#563](https://github.com/lynx-family/lynx-stack/pull/563))
41
+
42
+ Now you can override configuration like `useDefineForClassFields` using `tools.swc`.
43
+
44
+ ```js
45
+ import { defineConfig } from '@lynx-js/rspeedy'
46
+
47
+ export default defineConfig({
48
+ tools: {
49
+ swc: {
50
+ jsc: {
51
+ transform: {
52
+ useDefineForClassFields: true,
53
+ },
54
+ },
55
+ },
56
+ },
57
+ })
58
+ ```
59
+
60
+ - Updated dependencies [[`f1ca29b`](https://github.com/lynx-family/lynx-stack/commit/f1ca29bd766377dd46583f15e1e75bca447699cd)]:
61
+ - @lynx-js/react-webpack-plugin@0.6.11
62
+ - @lynx-js/react-alias-rsbuild-plugin@0.9.7
63
+ - @lynx-js/react-refresh-webpack-plugin@0.3.2
64
+ - @lynx-js/web-webpack-plugin@0.6.5
65
+
3
66
  ## 0.9.6
4
67
 
5
68
  ### Patch Changes
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_runtime_wrapper_webpack_plugin_27
8
8
  import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_web_webpack_plugin_6ba19e5a__ from "@lynx-js/web-webpack-plugin";
9
9
  import * as __WEBPACK_EXTERNAL_MODULE__lynx_js_react_refresh_webpack_plugin_a01c5e97__ from "@lynx-js/react-refresh-webpack-plugin";
10
10
  var __webpack_modules__ = {
11
- "../../../node_modules/.pnpm/typia@9.0.1_@samchon+openapi@4.0.0_typescript@5.8.3/node_modules/typia/lib/internal/_accessExpressionAsString.js": function(__unused_webpack_module, exports) {
11
+ "../../../node_modules/.pnpm/typia@9.1.1_@samchon+openapi@4.1.0_typescript@5.8.3/node_modules/typia/lib/internal/_accessExpressionAsString.js": function(__unused_webpack_module, exports) {
12
12
  exports._accessExpressionAsString = void 0;
13
13
  const _accessExpressionAsString = (str)=>variable(str) ? `.${str}` : `[${JSON.stringify(str)}]`;
14
14
  exports._accessExpressionAsString = _accessExpressionAsString;
@@ -53,9 +53,9 @@ var __webpack_modules__ = {
53
53
  "with"
54
54
  ]);
55
55
  },
56
- "../../../node_modules/.pnpm/typia@9.0.1_@samchon+openapi@4.0.0_typescript@5.8.3/node_modules/typia/lib/internal/_assertGuard.js": function(__unused_webpack_module, exports, __webpack_require__) {
56
+ "../../../node_modules/.pnpm/typia@9.1.1_@samchon+openapi@4.1.0_typescript@5.8.3/node_modules/typia/lib/internal/_assertGuard.js": function(__unused_webpack_module, exports, __webpack_require__) {
57
57
  exports._assertGuard = void 0;
58
- const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.0.1_@samchon+openapi@4.0.0_typescript@5.8.3/node_modules/typia/lib/TypeGuardError.mjs");
58
+ const TypeGuardError_1 = __webpack_require__("../../../node_modules/.pnpm/typia@9.1.1_@samchon+openapi@4.1.0_typescript@5.8.3/node_modules/typia/lib/TypeGuardError.mjs");
59
59
  const _assertGuard = (exceptionable, props, factory)=>{
60
60
  if (true === exceptionable) if (factory) throw factory(props);
61
61
  else throw new TypeGuardError_1.TypeGuardError(props);
@@ -63,7 +63,7 @@ var __webpack_modules__ = {
63
63
  };
64
64
  exports._assertGuard = _assertGuard;
65
65
  },
66
- "../../../node_modules/.pnpm/typia@9.0.1_@samchon+openapi@4.0.0_typescript@5.8.3/node_modules/typia/lib/TypeGuardError.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
66
+ "../../../node_modules/.pnpm/typia@9.1.1_@samchon+openapi@4.1.0_typescript@5.8.3/node_modules/typia/lib/TypeGuardError.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
67
67
  __webpack_require__.r(__webpack_exports__);
68
68
  __webpack_require__.d(__webpack_exports__, {
69
69
  TypeGuardError: ()=>TypeGuardError
@@ -130,10 +130,20 @@ const ALIAS_BACKGROUND_ONLY_MAIN = 'react:alias-background-only-main';
130
130
  const ALIAS_BACKGROUND_ONLY_BACKGROUND = 'react:alias-background-only-background';
131
131
  function applyBackgroundOnly(api) {
132
132
  const __dirname = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].dirname((0, __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__.fileURLToPath)(import.meta.url));
133
- api.modifyBundlerChain((chain)=>{
134
- chain.module.rule(ALIAS_BACKGROUND_ONLY_MAIN).issuerLayer(__WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__.LAYERS.MAIN_THREAD).resolve.alias.set('background-only$', __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(__dirname, 'background-only', 'error.js'));
135
- chain.module.rule(ALIAS_BACKGROUND_ONLY_BACKGROUND).issuerLayer(__WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__.LAYERS.BACKGROUND).resolve.alias.set('background-only$', __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(__dirname, 'background-only', 'empty.js'));
136
- chain.module.rule(DETECT_IMPORT_ERROR).test(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(__dirname, 'background-only', 'error.js')).issuerLayer(__WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__.LAYERS.MAIN_THREAD).use(DETECT_IMPORT_ERROR).loader(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(__dirname, 'loaders/invalid-import-error-loader')).options({
133
+ const backgroundResolve = (0, __WEBPACK_EXTERNAL_MODULE__lynx_js_react_alias_rsbuild_plugin_2a0391db__.createLazyResolver)(__dirname, [
134
+ 'import'
135
+ ]);
136
+ const mainThreadResolve = (0, __WEBPACK_EXTERNAL_MODULE__lynx_js_react_alias_rsbuild_plugin_2a0391db__.createLazyResolver)(__dirname, [
137
+ 'lepus'
138
+ ]);
139
+ api.modifyBundlerChain(async (chain)=>{
140
+ const backgroundOnly = {
141
+ background: await backgroundResolve('background-only'),
142
+ mainThread: await mainThreadResolve('background-only')
143
+ };
144
+ chain.module.rule(ALIAS_BACKGROUND_ONLY_MAIN).issuerLayer(__WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__.LAYERS.MAIN_THREAD).resolve.alias.set('background-only$', backgroundOnly.mainThread);
145
+ chain.module.rule(ALIAS_BACKGROUND_ONLY_BACKGROUND).issuerLayer(__WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__.LAYERS.BACKGROUND).resolve.alias.set('background-only$', backgroundOnly.background);
146
+ chain.module.rule(DETECT_IMPORT_ERROR).test(backgroundOnly.mainThread).issuerLayer(__WEBPACK_EXTERNAL_MODULE__lynx_js_react_webpack_plugin_1806f3f7__.LAYERS.MAIN_THREAD).use(DETECT_IMPORT_ERROR).loader(__WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].resolve(__dirname, 'loaders/invalid-import-error-loader')).options({
137
147
  message: '\'background-only\' cannot be imported from a main-thread module.'
138
148
  });
139
149
  });
@@ -479,28 +489,28 @@ const applySplitChunksRule = (api)=>{
479
489
  });
480
490
  };
481
491
  function applySWC(api) {
482
- api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>mergeRsbuildConfig(config, {
492
+ api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>mergeRsbuildConfig({
483
493
  tools: {
484
- swc (config) {
485
- config.jsc ??= {};
486
- config.jsc.transform ??= {};
487
- config.jsc.transform.useDefineForClassFields = false;
488
- config.jsc.transform.optimizer ??= {};
489
- config.jsc.transform.optimizer.simplify = true;
490
- config.jsc.parser ??= {
491
- syntax: "typescript"
492
- };
493
- if ("typescript" === config.jsc.parser.syntax) {
494
- config.jsc.parser.tsx = false;
495
- config.jsc.parser.decorators = true;
494
+ swc: {
495
+ jsc: {
496
+ transform: {
497
+ useDefineForClassFields: false,
498
+ optimizer: {
499
+ simplify: true
500
+ }
501
+ },
502
+ parser: {
503
+ syntax: "typescript",
504
+ tsx: false,
505
+ decorators: true
506
+ }
496
507
  }
497
- return config;
498
508
  }
499
509
  }
500
- }));
510
+ }, config));
501
511
  }
502
- var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.0.1_@samchon+openapi@4.0.0_typescript@5.8.3/node_modules/typia/lib/internal/_accessExpressionAsString.js");
503
- var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.0.1_@samchon+openapi@4.0.0_typescript@5.8.3/node_modules/typia/lib/internal/_assertGuard.js");
512
+ var _accessExpressionAsString = __webpack_require__("../../../node_modules/.pnpm/typia@9.1.1_@samchon+openapi@4.1.0_typescript@5.8.3/node_modules/typia/lib/internal/_accessExpressionAsString.js");
513
+ var _assertGuard = __webpack_require__("../../../node_modules/.pnpm/typia@9.1.1_@samchon+openapi@4.1.0_typescript@5.8.3/node_modules/typia/lib/internal/_assertGuard.js");
504
514
  const validateConfig = (()=>{
505
515
  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)=>{
506
516
  if ([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-rsbuild-plugin",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "description": "A rsbuild plugin for ReactLynx",
5
5
  "keywords": [
6
6
  "rsbuild",
@@ -32,33 +32,34 @@
32
32
  "README.md"
33
33
  ],
34
34
  "dependencies": {
35
+ "background-only": "^0.0.1",
35
36
  "@lynx-js/css-extract-webpack-plugin": "0.5.3",
36
- "@lynx-js/react-alias-rsbuild-plugin": "0.9.6",
37
+ "@lynx-js/react-alias-rsbuild-plugin": "0.9.8",
37
38
  "@lynx-js/react-refresh-webpack-plugin": "0.3.2",
38
- "@lynx-js/react-webpack-plugin": "0.6.10",
39
+ "@lynx-js/react-webpack-plugin": "0.6.12",
39
40
  "@lynx-js/runtime-wrapper-webpack-plugin": "0.0.9",
40
- "@lynx-js/template-webpack-plugin": "0.6.9",
41
- "@lynx-js/web-webpack-plugin": "0.6.4"
41
+ "@lynx-js/template-webpack-plugin": "0.6.10",
42
+ "@lynx-js/web-webpack-plugin": "0.6.6"
42
43
  },
43
44
  "devDependencies": {
44
- "@microsoft/api-extractor": "7.52.3",
45
+ "@microsoft/api-extractor": "7.52.5",
45
46
  "@rollup/plugin-typescript": "^12.1.2",
46
- "@rsbuild/core": "1.3.5",
47
+ "@rsbuild/core": "1.3.11",
47
48
  "@rsbuild/plugin-sass": "1.3.1",
48
49
  "@rsbuild/plugin-typed-css-modules": "1.0.2",
49
50
  "@rsbuild/plugin-webpack-swc": "1.1.0",
50
51
  "@rsbuild/webpack": "1.3.0",
51
- "@samchon/openapi": "4.0.0",
52
+ "@samchon/openapi": "4.1.0",
52
53
  "tailwindcss": "^3.4.17",
53
- "type-fest": "^4.39.1",
54
- "typia": "9.0.1",
55
- "typia-rspack-plugin": "2.0.0",
56
- "@lynx-js/react": "0.106.4",
57
- "@lynx-js/rspeedy": "0.9.1",
54
+ "type-fest": "^4.40.0",
55
+ "typia": "9.1.1",
56
+ "typia-rspack-plugin": "2.0.1",
57
+ "@lynx-js/react": "0.107.0",
58
+ "@lynx-js/rspeedy": "0.9.3",
58
59
  "@lynx-js/vitest-setup": "0.0.0"
59
60
  },
60
61
  "peerDependencies": {
61
- "@lynx-js/react": "^0.103.0 || ^0.104.0 || ^0.105.0 || ^0.106.0"
62
+ "@lynx-js/react": "^0.103.0 || ^0.104.0 || ^0.105.0 || ^0.106.0 || ^0.107.0"
62
63
  },
63
64
  "peerDependenciesMeta": {
64
65
  "@lynx-js/react": {
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};