@lynx-js/rspeedy-canary 0.11.1-canary-20250905-877d1535 → 0.11.2-canary-20250909-e4b12444

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,28 @@
1
1
  # @lynx-js/rspeedy
2
2
 
3
- ## 0.11.1-canary-20250905120148-877d15356c059640bfb350eea2675af63376c8e4
3
+ ## 0.11.2-canary-20250909030138-e4b1244499aab497857933e93562a581d7f2d32e
4
+
5
+ ### Patch Changes
6
+
7
+ - Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
8
+
9
+ This is useful when having multiple duplicated packages in the bundle:
10
+
11
+ ```js
12
+ import { defineConfig } from "@lynx-js/rspeedy";
13
+
14
+ export default defineConfig({
15
+ resolve: {
16
+ dedupe: ["tslib"],
17
+ },
18
+ });
19
+ ```
20
+
21
+ - Updated dependencies [[`d7c5da3`](https://github.com/lynx-family/lynx-stack/commit/d7c5da329caddfb12ed77159fb8b1b8f38717cff)]:
22
+ - @lynx-js/chunk-loading-webpack-plugin@0.3.3-canary-20250909030138-e4b1244499aab497857933e93562a581d7f2d32e
23
+ - @lynx-js/cache-events-webpack-plugin@0.0.2
24
+
25
+ ## 0.11.1
4
26
 
5
27
  ### Patch Changes
6
28
 
package/dist/index.d.ts CHANGED
@@ -2470,6 +2470,30 @@ export declare interface Resolve {
2470
2470
  * ```
2471
2471
  */
2472
2472
  alias?: Record<string, string | false | string[]> | undefined;
2473
+ /**
2474
+ * Force to resolve the specified packages from project root, which is useful for deduplicating packages and reducing the bundle size.
2475
+ *
2476
+ * @remarks
2477
+ *
2478
+ * {@link Resolve.dedupe} is implemented based on {@link Resolve.alias}, it will get the path of the specified package through `require.resolve` in the project root directory and set it to the alias.
2479
+ *
2480
+ * The alias generated by {@link Resolve.dedupe} will be merged with the configured {@link Resolve.alias} in the project, and the {@link Resolve.alias} config will take precedence when the keys are the same.
2481
+ *
2482
+ * @example
2483
+ *
2484
+ * Use `tslib` from the project root directory.
2485
+ *
2486
+ * ```js
2487
+ * import { defineConfig } from '@lynx-js/rspeedy'
2488
+ *
2489
+ * export default defineConfig({
2490
+ * resolve: {
2491
+ * dedupe: ['tslib'],
2492
+ * },
2493
+ * })
2494
+ * ```
2495
+ */
2496
+ dedupe?: string[] | undefined;
2473
2497
  }
2474
2498
 
2475
2499
  export { RsbuildPlugin }
package/dist/index.js CHANGED
@@ -108,7 +108,7 @@ var __webpack_modules__ = {
108
108
  });
109
109
  var core_ = __webpack_require__("@rsbuild/core");
110
110
  var package_namespaceObject = {
111
- rE: "0.11.0"
111
+ rE: "0.11.1"
112
112
  };
113
113
  const version = package_namespaceObject.rE;
114
114
  const rspackVersion = core_.rspack.rspackVersion;
@@ -342,7 +342,8 @@ function toRsbuildConfig(config) {
342
342
  sourceMap: config.output?.sourceMap
343
343
  },
344
344
  resolve: {
345
- alias: config.resolve?.alias
345
+ alias: config.resolve?.alias,
346
+ dedupe: config.resolve?.dedupe
346
347
  },
347
348
  source: {
348
349
  alias: config.source?.alias,
@@ -322,7 +322,8 @@ export const __webpack_modules__ = {
322
322
  sourceMap: config.output?.sourceMap
323
323
  },
324
324
  resolve: {
325
- alias: config.resolve?.alias
325
+ alias: config.resolve?.alias,
326
+ dedupe: config.resolve?.dedupe
326
327
  },
327
328
  source: {
328
329
  alias: config.source?.alias,
@@ -41,7 +41,7 @@ export const __webpack_modules__ = {
41
41
  });
42
42
  var core_ = __webpack_require__("@rsbuild/core");
43
43
  var package_namespaceObject = {
44
- rE: "0.11.0"
44
+ rE: "0.11.1"
45
45
  };
46
46
  const version = package_namespaceObject.rE;
47
47
  const rspackVersion = core_.rspack.rspackVersion;
@@ -314,7 +314,8 @@ export const __webpack_modules__ = {
314
314
  sourceMap: config.output?.sourceMap
315
315
  },
316
316
  resolve: {
317
- alias: config.resolve?.alias
317
+ alias: config.resolve?.alias,
318
+ dedupe: config.resolve?.dedupe
318
319
  },
319
320
  source: {
320
321
  alias: config.source?.alias,
@@ -260,7 +260,8 @@ export const __webpack_modules__ = {
260
260
  sourceMap: config.output?.sourceMap
261
261
  },
262
262
  resolve: {
263
- alias: config.resolve?.alias
263
+ alias: config.resolve?.alias,
264
+ dedupe: config.resolve?.dedupe
264
265
  },
265
266
  source: {
266
267
  alias: config.source?.alias,
@@ -262,7 +262,8 @@ export const __webpack_modules__ = {
262
262
  sourceMap: config.output?.sourceMap
263
263
  },
264
264
  resolve: {
265
- alias: config.resolve?.alias
265
+ alias: config.resolve?.alias,
266
+ dedupe: config.resolve?.dedupe
266
267
  },
267
268
  source: {
268
269
  alias: config.source?.alias,