@lynx-js/rspeedy-canary 0.11.2-canary-20250911-c9781c71 → 0.11.2-canary-20250911-7bfd4bfb

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,6 +1,6 @@
1
1
  # @lynx-js/rspeedy
2
2
 
3
- ## 0.11.2-canary-20250911134840-c9781c710032e0c59d3c761459b581067b0c3168
3
+ ## 0.11.2-canary-20250911165142-7bfd4bfb3da200017abaf7838e3be0b4f7c71bc5
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -38,10 +38,27 @@
38
38
  });
39
39
  ```
40
40
 
41
+ - Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
42
+
43
+ ```js
44
+ import { defineConfig } from "@lynx-js/rspeedy";
45
+
46
+ export default defineConfig({
47
+ resolve: {
48
+ alias: {
49
+ "@": "./src",
50
+ },
51
+ // 'prefer-tsconfig' (default): tsconfig.json paths take priority
52
+ // 'prefer-alias': resolve.alias takes priority
53
+ aliasStrategy: "prefer-alias",
54
+ },
55
+ });
56
+ ```
57
+
41
58
  - Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
42
59
 
43
60
  - Updated dependencies [[`d7c5da3`](https://github.com/lynx-family/lynx-stack/commit/d7c5da329caddfb12ed77159fb8b1b8f38717cff)]:
44
- - @lynx-js/chunk-loading-webpack-plugin@0.3.3-canary-20250911134840-c9781c710032e0c59d3c761459b581067b0c3168
61
+ - @lynx-js/chunk-loading-webpack-plugin@0.3.3-canary-20250911165142-7bfd4bfb3da200017abaf7838e3be0b4f7c71bc5
45
62
  - @lynx-js/cache-events-webpack-plugin@0.0.2
46
63
 
47
64
  ## 0.11.1
package/dist/index.d.ts CHANGED
@@ -2541,6 +2541,30 @@ export declare interface Resolve {
2541
2541
  * ```
2542
2542
  */
2543
2543
  alias?: Record<string, string | false | string[]> | undefined;
2544
+ /**
2545
+ * Set the strategy for path alias resolution, to control the priority relationship
2546
+ * between the `paths` option in `tsconfig.json` and the `resolve.alias` option of Rsbuild.
2547
+ * - `prefer-tsconfig` (default): The `paths` option in `tsconfig.json` will take precedence over the
2548
+ * `resolve.alias` option of Rsbuild.
2549
+ * - `prefer-alias`: The `resolve.alias` option of Rsbuild will take precedence over the
2550
+ * `paths` option in `tsconfig.json`.
2551
+ *
2552
+ * @example
2553
+ *
2554
+ * ```js
2555
+ * import { defineConfig } from '@lynx-js/rspeedy'
2556
+ *
2557
+ * export default defineConfig({
2558
+ * resolve: {
2559
+ * alias: {
2560
+ * '@': './src',
2561
+ * },
2562
+ * aliasStrategy: 'prefer-alias',
2563
+ * },
2564
+ * })
2565
+ * ```
2566
+ */
2567
+ aliasStrategy?: 'prefer-tsconfig' | 'prefer-alias' | undefined;
2544
2568
  /**
2545
2569
  * Force to resolve the specified packages from project root, which is useful for deduplicating packages and reducing the bundle size.
2546
2570
  *
package/dist/index.js CHANGED
@@ -343,6 +343,7 @@ function toRsbuildConfig(config) {
343
343
  },
344
344
  resolve: {
345
345
  alias: config.resolve?.alias,
346
+ aliasStrategy: config.resolve?.aliasStrategy,
346
347
  dedupe: config.resolve?.dedupe
347
348
  },
348
349
  source: {
@@ -327,6 +327,7 @@ export const __webpack_modules__ = {
327
327
  },
328
328
  resolve: {
329
329
  alias: config.resolve?.alias,
330
+ aliasStrategy: config.resolve?.aliasStrategy,
330
331
  dedupe: config.resolve?.dedupe
331
332
  },
332
333
  source: {
@@ -319,6 +319,7 @@ export const __webpack_modules__ = {
319
319
  },
320
320
  resolve: {
321
321
  alias: config.resolve?.alias,
322
+ aliasStrategy: config.resolve?.aliasStrategy,
322
323
  dedupe: config.resolve?.dedupe
323
324
  },
324
325
  source: {
@@ -265,6 +265,7 @@ export const __webpack_modules__ = {
265
265
  },
266
266
  resolve: {
267
267
  alias: config.resolve?.alias,
268
+ aliasStrategy: config.resolve?.aliasStrategy,
268
269
  dedupe: config.resolve?.dedupe
269
270
  },
270
271
  source: {
@@ -267,6 +267,7 @@ export const __webpack_modules__ = {
267
267
  },
268
268
  resolve: {
269
269
  alias: config.resolve?.alias,
270
+ aliasStrategy: config.resolve?.aliasStrategy,
270
271
  dedupe: config.resolve?.dedupe
271
272
  },
272
273
  source: {
@@ -1492,9 +1492,9 @@ export const __webpack_modules__ = {
1492
1492
  if (void 0 === value) return true;
1493
1493
  return "string" == typeof value || "boolean" == typeof value;
1494
1494
  });
1495
- const _io41 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6652"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
1495
+ const _io41 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@922"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
1496
1496
  if ([
1497
- "__@toStringTag@6652"
1497
+ "__@toStringTag@922"
1498
1498
  ].some((prop)=>key === prop)) return true;
1499
1499
  const value = input[key];
1500
1500
  if (void 0 === value) return true;
@@ -3102,14 +3102,14 @@ export const __webpack_modules__ = {
3102
3102
  if (void 0 === value) return true;
3103
3103
  return false;
3104
3104
  })));
3105
- const _io149 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@6652"] && Object.keys(input).every((key)=>{
3105
+ const _io149 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@922"] && Object.keys(input).every((key)=>{
3106
3106
  if ([
3107
3107
  "BYTES_PER_ELEMENT",
3108
3108
  "buffer",
3109
3109
  "byteLength",
3110
3110
  "byteOffset",
3111
3111
  "length",
3112
- "__@toStringTag@6652"
3112
+ "__@toStringTag@922"
3113
3113
  ].some((prop)=>key === prop)) return true;
3114
3114
  const value = input[key];
3115
3115
  if (void 0 === value) return true;
@@ -6363,9 +6363,9 @@ export const __webpack_modules__ = {
6363
6363
  if (void 0 === value) return true;
6364
6364
  return false;
6365
6365
  }));
6366
- const _io406 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6652"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6366
+ const _io406 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@922"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
6367
6367
  if ([
6368
- "__@toStringTag@6652"
6368
+ "__@toStringTag@922"
6369
6369
  ].some((prop)=>key === prop)) return true;
6370
6370
  const value = input[key];
6371
6371
  if (void 0 === value) return true;
@@ -6508,9 +6508,10 @@ export const __webpack_modules__ = {
6508
6508
  if (void 0 === value) return true;
6509
6509
  return false;
6510
6510
  }));
6511
- const _io418 = (input, _exceptionable = true)=>(void 0 === input.alias || "object" == typeof input.alias && null !== input.alias && false === Array.isArray(input.alias) && _io419(input.alias, _exceptionable)) && (void 0 === input.dedupe || Array.isArray(input.dedupe) && input.dedupe.every((elem, _index338)=>"string" == typeof elem)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
6511
+ const _io418 = (input, _exceptionable = true)=>(void 0 === input.alias || "object" == typeof input.alias && null !== input.alias && false === Array.isArray(input.alias) && _io419(input.alias, _exceptionable)) && (void 0 === input.aliasStrategy || "prefer-tsconfig" === input.aliasStrategy || "prefer-alias" === input.aliasStrategy) && (void 0 === input.dedupe || Array.isArray(input.dedupe) && input.dedupe.every((elem, _index338)=>"string" == typeof elem)) && (0 === Object.keys(input).length || Object.keys(input).every((key)=>{
6512
6512
  if ([
6513
6513
  "alias",
6514
+ "aliasStrategy",
6514
6515
  "dedupe"
6515
6516
  ].some((prop)=>key === prop)) return true;
6516
6517
  const value = input[key];
@@ -6966,18 +6967,18 @@ export const __webpack_modules__ = {
6966
6967
  return false;
6967
6968
  })();
6968
6969
  const _iu1 = (input, _exceptionable = true)=>(()=>{
6969
- if (void 0 !== input["__@toStringTag@6652"]) return _io149(input, _exceptionable);
6970
+ if (void 0 !== input["__@toStringTag@922"]) return _io149(input, _exceptionable);
6970
6971
  if (void 0 !== input.pem) return _io150(input, _exceptionable);
6971
6972
  return false;
6972
6973
  })();
6973
6974
  const _iu2 = (input, _exceptionable = true)=>(()=>{
6974
- if (void 0 !== input["__@toStringTag@6652"]) return _io149(input, _exceptionable);
6975
+ if (void 0 !== input["__@toStringTag@922"]) return _io149(input, _exceptionable);
6975
6976
  if (void 0 !== input.buf) return _io151(input, _exceptionable);
6976
6977
  return false;
6977
6978
  })();
6978
6979
  const _iu3 = (input, _exceptionable = true)=>(()=>{
6979
6980
  if (void 0 !== input.name) return _io405(input, _exceptionable);
6980
- if (void 0 !== input["__@toStringTag@6652"]) return _io406(input, _exceptionable);
6981
+ if (void 0 !== input["__@toStringTag@922"]) return _io406(input, _exceptionable);
6981
6982
  return false;
6982
6983
  })();
6983
6984
  const _iu4 = (input, _exceptionable = true)=>(()=>{
@@ -9572,14 +9573,14 @@ export const __webpack_modules__ = {
9572
9573
  }).every((flag)=>flag)
9573
9574
  ].every((flag)=>flag);
9574
9575
  const _vo41 = (input, _path, _exceptionable = true)=>[
9575
- "string" == typeof input["__@toStringTag@6652"] || _report(_exceptionable, {
9576
- path: _path + "[\"__@toStringTag@6652\"]",
9576
+ "string" == typeof input["__@toStringTag@922"] || _report(_exceptionable, {
9577
+ path: _path + "[\"__@toStringTag@922\"]",
9577
9578
  expected: "string",
9578
- value: input["__@toStringTag@6652"]
9579
+ value: input["__@toStringTag@922"]
9579
9580
  }),
9580
9581
  1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
9581
9582
  if ([
9582
- "__@toStringTag@6652"
9583
+ "__@toStringTag@922"
9583
9584
  ].some((prop)=>key === prop)) return true;
9584
9585
  const value = input[key];
9585
9586
  if (void 0 === value) return true;
@@ -18593,10 +18594,10 @@ export const __webpack_modules__ = {
18593
18594
  expected: "number",
18594
18595
  value: input.length
18595
18596
  }),
18596
- "Uint8Array" === input["__@toStringTag@6652"] || _report(_exceptionable, {
18597
- path: _path + "[\"__@toStringTag@6652\"]",
18597
+ "Uint8Array" === input["__@toStringTag@922"] || _report(_exceptionable, {
18598
+ path: _path + "[\"__@toStringTag@922\"]",
18598
18599
  expected: "\"Uint8Array\"",
18599
- value: input["__@toStringTag@6652"]
18600
+ value: input["__@toStringTag@922"]
18600
18601
  }),
18601
18602
  false === _exceptionable || Object.keys(input).map((key)=>{
18602
18603
  if ([
@@ -18605,7 +18606,7 @@ export const __webpack_modules__ = {
18605
18606
  "byteLength",
18606
18607
  "byteOffset",
18607
18608
  "length",
18608
- "__@toStringTag@6652"
18609
+ "__@toStringTag@922"
18609
18610
  ].some((prop)=>key === prop)) return true;
18610
18611
  const value = input[key];
18611
18612
  if (void 0 === value) return true;
@@ -36666,14 +36667,14 @@ export const __webpack_modules__ = {
36666
36667
  }).every((flag)=>flag)
36667
36668
  ].every((flag)=>flag);
36668
36669
  const _vo406 = (input, _path, _exceptionable = true)=>[
36669
- "string" == typeof input["__@toStringTag@6652"] || _report(_exceptionable, {
36670
- path: _path + "[\"__@toStringTag@6652\"]",
36670
+ "string" == typeof input["__@toStringTag@922"] || _report(_exceptionable, {
36671
+ path: _path + "[\"__@toStringTag@922\"]",
36671
36672
  expected: "string",
36672
- value: input["__@toStringTag@6652"]
36673
+ value: input["__@toStringTag@922"]
36673
36674
  }),
36674
36675
  1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
36675
36676
  if ([
36676
- "__@toStringTag@6652"
36677
+ "__@toStringTag@922"
36677
36678
  ].some((prop)=>key === prop)) return true;
36678
36679
  const value = input[key];
36679
36680
  if (void 0 === value) return true;
@@ -37437,6 +37438,11 @@ export const __webpack_modules__ = {
37437
37438
  expected: "(Record<string, string | false | string[]> | undefined)",
37438
37439
  value: input.alias
37439
37440
  }),
37441
+ void 0 === input.aliasStrategy || "prefer-tsconfig" === input.aliasStrategy || "prefer-alias" === input.aliasStrategy || _report(_exceptionable, {
37442
+ path: _path + ".aliasStrategy",
37443
+ expected: "(\"prefer-alias\" | \"prefer-tsconfig\" | undefined)",
37444
+ value: input.aliasStrategy
37445
+ }),
37440
37446
  void 0 === input.dedupe || (Array.isArray(input.dedupe) || _report(_exceptionable, {
37441
37447
  path: _path + ".dedupe",
37442
37448
  expected: "(Array<string> | undefined)",
@@ -37453,6 +37459,7 @@ export const __webpack_modules__ = {
37453
37459
  0 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
37454
37460
  if ([
37455
37461
  "alias",
37462
+ "aliasStrategy",
37456
37463
  "dedupe"
37457
37464
  ].some((prop)=>key === prop)) return true;
37458
37465
  const value = input[key];
@@ -39745,7 +39752,7 @@ export const __webpack_modules__ = {
39745
39752
  });
39746
39753
  })();
39747
39754
  const _vu1 = (input, _path, _exceptionable = true)=>(()=>{
39748
- if (void 0 !== input["__@toStringTag@6652"]) return _vo149(input, _path, _exceptionable);
39755
+ if (void 0 !== input["__@toStringTag@922"]) return _vo149(input, _path, _exceptionable);
39749
39756
  if (void 0 !== input.pem) return _vo150(input, _path, _exceptionable);
39750
39757
  return _report(_exceptionable, {
39751
39758
  path: _path,
@@ -39754,7 +39761,7 @@ export const __webpack_modules__ = {
39754
39761
  });
39755
39762
  })();
39756
39763
  const _vu2 = (input, _path, _exceptionable = true)=>(()=>{
39757
- if (void 0 !== input["__@toStringTag@6652"]) return _vo149(input, _path, _exceptionable);
39764
+ if (void 0 !== input["__@toStringTag@922"]) return _vo149(input, _path, _exceptionable);
39758
39765
  if (void 0 !== input.buf) return _vo151(input, _path, _exceptionable);
39759
39766
  return _report(_exceptionable, {
39760
39767
  path: _path,
@@ -39764,7 +39771,7 @@ export const __webpack_modules__ = {
39764
39771
  })();
39765
39772
  const _vu3 = (input, _path, _exceptionable = true)=>(()=>{
39766
39773
  if (void 0 !== input.name) return _vo405(input, _path, _exceptionable);
39767
- if (void 0 !== input["__@toStringTag@6652"]) return _vo406(input, _path, _exceptionable);
39774
+ if (void 0 !== input["__@toStringTag@922"]) return _vo406(input, _path, _exceptionable);
39768
39775
  return _report(_exceptionable, {
39769
39776
  path: _path,
39770
39777
  expected: "(LooseRsbuildPlugin | RsbuildPlugins | LooseRsbuildPlugin | Falsy)",
@@ -20,11 +20,11 @@ export const __webpack_modules__ = {
20
20
  config,
21
21
  debug: _debug_js__WEBPACK_IMPORTED_MODULE_1__.Yz,
22
22
  async exit (code) {
23
- const { exit } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./src/cli/exit.ts"));
23
+ const { exit } = await __webpack_require__.e("src_cli_exit_ts").then(__webpack_require__.bind(__webpack_require__, "./src/cli/exit.ts"));
24
24
  return exit(code);
25
25
  },
26
26
  logger: _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger,
27
- version: _version_js__WEBPACK_IMPORTED_MODULE_2__.version
27
+ version: _version_js__WEBPACK_IMPORTED_MODULE_2__.rE
28
28
  });
29
29
  }
30
30
  };
@@ -8,8 +8,10 @@ export const __webpack_modules__ = {
8
8
  __webpack_require__.d(__webpack_exports__, {
9
9
  pluginRsdoctor: ()=>pluginRsdoctor
10
10
  });
11
- var _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rsbuild/core");
12
- var _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/is-ci.ts");
11
+ var core_ = __webpack_require__("@rsbuild/core");
12
+ function isCI() {
13
+ return !!process.env['CI'] && 'false' !== process.env['CI'];
14
+ }
13
15
  function pluginRsdoctor(options) {
14
16
  return {
15
17
  name: 'lynx:rsbuild:rsdoctor',
@@ -26,7 +28,7 @@ export const __webpack_modules__ = {
26
28
  if (registered) continue;
27
29
  config.plugins ??= [];
28
30
  const defaultOptions = {
29
- disableClientServer: (0, _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__.J)(),
31
+ disableClientServer: isCI(),
30
32
  supports: {
31
33
  banner: true
32
34
  },
@@ -41,20 +43,12 @@ export const __webpack_modules__ = {
41
43
  }
42
44
  }
43
45
  };
44
- config.plugins.push(new RsdoctorRspackPlugin((0, _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.mergeRsbuildConfig)(defaultOptions, options)));
46
+ config.plugins.push(new RsdoctorRspackPlugin((0, core_.mergeRsbuildConfig)(defaultOptions, options)));
45
47
  }
46
- _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger.info("Rsdoctor is enabled.");
48
+ core_.logger.info("Rsdoctor is enabled.");
47
49
  });
48
50
  }
49
51
  };
50
52
  }
51
- },
52
- "./src/utils/is-ci.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
53
- __webpack_require__.d(__webpack_exports__, {
54
- J: ()=>isCI
55
- });
56
- function isCI() {
57
- return !!process.env['CI'] && 'false' !== process.env['CI'];
58
- }
59
53
  }
60
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/rspeedy-canary",
3
- "version": "0.11.2-canary-20250911-c9781c71",
3
+ "version": "0.11.2-canary-20250911-7bfd4bfb",
4
4
  "description": "A webpack/rspack-based frontend toolchain for Lynx",
5
5
  "keywords": [
6
6
  "webpack",
@@ -49,7 +49,7 @@
49
49
  ],
50
50
  "dependencies": {
51
51
  "@lynx-js/cache-events-webpack-plugin": "npm:@lynx-js/cache-events-webpack-plugin-canary@0.0.2",
52
- "@lynx-js/chunk-loading-webpack-plugin": "npm:@lynx-js/chunk-loading-webpack-plugin-canary@0.3.3-canary-20250911-c9781c71",
52
+ "@lynx-js/chunk-loading-webpack-plugin": "npm:@lynx-js/chunk-loading-webpack-plugin-canary@0.3.3-canary-20250911-7bfd4bfb",
53
53
  "@lynx-js/webpack-dev-transport": "npm:@lynx-js/webpack-dev-transport-canary@0.2.0",
54
54
  "@lynx-js/websocket": "npm:@lynx-js/websocket-canary@0.0.4",
55
55
  "@rsbuild/core": "1.5.4",