@rspack/core 1.6.1 → 1.6.2
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/compiled/browserslist-load-config/index.js +2 -2
- package/compiled/watchpack/index.js +23 -23
- package/compiled/webpack-sources/index.js +82 -82
- package/dist/Resolver.d.ts +14 -2
- package/dist/config/normalization.d.ts +3 -0
- package/dist/config/types.d.ts +1 -0
- package/dist/container/ModuleFederationManifestPlugin.d.ts +37 -0
- package/dist/container/ModuleFederationPlugin.d.ts +2 -0
- package/dist/index.js +205 -88
- package/dist/worker.js +0 -10
- package/package.json +7 -7
|
@@ -16,7 +16,7 @@ module.exports = require("node:path");
|
|
|
16
16
|
|
|
17
17
|
/***/ }),
|
|
18
18
|
|
|
19
|
-
/***/
|
|
19
|
+
/***/ 867:
|
|
20
20
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
21
21
|
|
|
22
22
|
|
|
@@ -245,7 +245,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
245
245
|
/******/ // startup
|
|
246
246
|
/******/ // Load entry module and return exports
|
|
247
247
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
248
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
248
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(867);
|
|
249
249
|
/******/ module.exports = __webpack_exports__;
|
|
250
250
|
/******/
|
|
251
251
|
/******/ })()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 428:
|
|
5
5
|
/***/ ((module) => {
|
|
6
6
|
|
|
7
7
|
module.exports = function (glob, opts) {
|
|
@@ -138,7 +138,7 @@ module.exports = function (glob, opts) {
|
|
|
138
138
|
|
|
139
139
|
/***/ }),
|
|
140
140
|
|
|
141
|
-
/***/
|
|
141
|
+
/***/ 648:
|
|
142
142
|
/***/ ((module) => {
|
|
143
143
|
|
|
144
144
|
"use strict";
|
|
@@ -169,13 +169,13 @@ function clone (obj) {
|
|
|
169
169
|
|
|
170
170
|
/***/ }),
|
|
171
171
|
|
|
172
|
-
/***/
|
|
172
|
+
/***/ 692:
|
|
173
173
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
174
174
|
|
|
175
175
|
var fs = __nccwpck_require__(896)
|
|
176
|
-
var polyfills = __nccwpck_require__(
|
|
177
|
-
var legacy = __nccwpck_require__(
|
|
178
|
-
var clone = __nccwpck_require__(
|
|
176
|
+
var polyfills = __nccwpck_require__(161)
|
|
177
|
+
var legacy = __nccwpck_require__(50)
|
|
178
|
+
var clone = __nccwpck_require__(648)
|
|
179
179
|
|
|
180
180
|
var util = __nccwpck_require__(23)
|
|
181
181
|
|
|
@@ -624,7 +624,7 @@ function retry () {
|
|
|
624
624
|
|
|
625
625
|
/***/ }),
|
|
626
626
|
|
|
627
|
-
/***/
|
|
627
|
+
/***/ 50:
|
|
628
628
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
629
629
|
|
|
630
630
|
var Stream = (__nccwpck_require__(203).Stream)
|
|
@@ -749,7 +749,7 @@ function legacy (fs) {
|
|
|
749
749
|
|
|
750
750
|
/***/ }),
|
|
751
751
|
|
|
752
|
-
/***/
|
|
752
|
+
/***/ 161:
|
|
753
753
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
754
754
|
|
|
755
755
|
var constants = __nccwpck_require__(140)
|
|
@@ -1111,7 +1111,7 @@ function patch (fs) {
|
|
|
1111
1111
|
|
|
1112
1112
|
/***/ }),
|
|
1113
1113
|
|
|
1114
|
-
/***/
|
|
1114
|
+
/***/ 40:
|
|
1115
1115
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1116
1116
|
|
|
1117
1117
|
"use strict";
|
|
@@ -1122,10 +1122,10 @@ function patch (fs) {
|
|
|
1122
1122
|
|
|
1123
1123
|
|
|
1124
1124
|
const EventEmitter = (__nccwpck_require__(434).EventEmitter);
|
|
1125
|
-
const fs = __nccwpck_require__(
|
|
1125
|
+
const fs = __nccwpck_require__(692);
|
|
1126
1126
|
const path = __nccwpck_require__(928);
|
|
1127
1127
|
|
|
1128
|
-
const watchEventSource = __nccwpck_require__(
|
|
1128
|
+
const watchEventSource = __nccwpck_require__(729);
|
|
1129
1129
|
|
|
1130
1130
|
const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({});
|
|
1131
1131
|
|
|
@@ -1910,7 +1910,7 @@ function ensureFsAccuracy(mtime) {
|
|
|
1910
1910
|
|
|
1911
1911
|
/***/ }),
|
|
1912
1912
|
|
|
1913
|
-
/***/
|
|
1913
|
+
/***/ 751:
|
|
1914
1914
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1915
1915
|
|
|
1916
1916
|
"use strict";
|
|
@@ -2025,7 +2025,7 @@ module.exports = LinkResolver;
|
|
|
2025
2025
|
|
|
2026
2026
|
/***/ }),
|
|
2027
2027
|
|
|
2028
|
-
/***/
|
|
2028
|
+
/***/ 510:
|
|
2029
2029
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2030
2030
|
|
|
2031
2031
|
"use strict";
|
|
@@ -2036,7 +2036,7 @@ module.exports = LinkResolver;
|
|
|
2036
2036
|
|
|
2037
2037
|
|
|
2038
2038
|
const path = __nccwpck_require__(928);
|
|
2039
|
-
const DirectoryWatcher = __nccwpck_require__(
|
|
2039
|
+
const DirectoryWatcher = __nccwpck_require__(40);
|
|
2040
2040
|
|
|
2041
2041
|
class WatcherManager {
|
|
2042
2042
|
constructor(options) {
|
|
@@ -2085,7 +2085,7 @@ module.exports.WatcherManager = WatcherManager;
|
|
|
2085
2085
|
|
|
2086
2086
|
/***/ }),
|
|
2087
2087
|
|
|
2088
|
-
/***/
|
|
2088
|
+
/***/ 864:
|
|
2089
2089
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2090
2090
|
|
|
2091
2091
|
"use strict";
|
|
@@ -2231,7 +2231,7 @@ module.exports = (plan, limit) => {
|
|
|
2231
2231
|
|
|
2232
2232
|
/***/ }),
|
|
2233
2233
|
|
|
2234
|
-
/***/
|
|
2234
|
+
/***/ 729:
|
|
2235
2235
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2236
2236
|
|
|
2237
2237
|
"use strict";
|
|
@@ -2244,7 +2244,7 @@ module.exports = (plan, limit) => {
|
|
|
2244
2244
|
const fs = __nccwpck_require__(896);
|
|
2245
2245
|
const path = __nccwpck_require__(928);
|
|
2246
2246
|
const { EventEmitter } = __nccwpck_require__(434);
|
|
2247
|
-
const reducePlan = __nccwpck_require__(
|
|
2247
|
+
const reducePlan = __nccwpck_require__(864);
|
|
2248
2248
|
|
|
2249
2249
|
const IS_OSX = (__nccwpck_require__(857).platform)() === "darwin";
|
|
2250
2250
|
const IS_WIN = (__nccwpck_require__(857).platform)() === "win32";
|
|
@@ -2610,7 +2610,7 @@ exports.watcherLimit = watcherLimit;
|
|
|
2610
2610
|
|
|
2611
2611
|
/***/ }),
|
|
2612
2612
|
|
|
2613
|
-
/***/
|
|
2613
|
+
/***/ 851:
|
|
2614
2614
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2615
2615
|
|
|
2616
2616
|
"use strict";
|
|
@@ -2620,11 +2620,11 @@ exports.watcherLimit = watcherLimit;
|
|
|
2620
2620
|
*/
|
|
2621
2621
|
|
|
2622
2622
|
|
|
2623
|
-
const getWatcherManager = __nccwpck_require__(
|
|
2624
|
-
const LinkResolver = __nccwpck_require__(
|
|
2623
|
+
const getWatcherManager = __nccwpck_require__(510);
|
|
2624
|
+
const LinkResolver = __nccwpck_require__(751);
|
|
2625
2625
|
const EventEmitter = (__nccwpck_require__(434).EventEmitter);
|
|
2626
|
-
const globToRegExp = __nccwpck_require__(
|
|
2627
|
-
const watchEventSource = __nccwpck_require__(
|
|
2626
|
+
const globToRegExp = __nccwpck_require__(428);
|
|
2627
|
+
const watchEventSource = __nccwpck_require__(729);
|
|
2628
2628
|
|
|
2629
2629
|
const EMPTY_ARRAY = [];
|
|
2630
2630
|
const EMPTY_OPTIONS = {};
|
|
@@ -3117,7 +3117,7 @@ module.exports = require("util");
|
|
|
3117
3117
|
/******/ // startup
|
|
3118
3118
|
/******/ // Load entry module and return exports
|
|
3119
3119
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
3120
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
3120
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(851);
|
|
3121
3121
|
/******/ module.exports = __webpack_exports__;
|
|
3122
3122
|
/******/
|
|
3123
3123
|
/******/ })()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 780:
|
|
6
6
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
const Source = __nccwpck_require__(
|
|
16
|
-
const streamAndGetSourceAndMap = __nccwpck_require__(
|
|
17
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
18
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
15
|
+
const Source = __nccwpck_require__(422);
|
|
16
|
+
const streamAndGetSourceAndMap = __nccwpck_require__(334);
|
|
17
|
+
const streamChunksOfRawSource = __nccwpck_require__(771);
|
|
18
|
+
const streamChunksOfSourceMap = __nccwpck_require__(105);
|
|
19
19
|
const {
|
|
20
20
|
isDualStringBufferCachingEnabled,
|
|
21
|
-
} = __nccwpck_require__(
|
|
21
|
+
} = __nccwpck_require__(357);
|
|
22
22
|
|
|
23
23
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
24
24
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -408,7 +408,7 @@ module.exports = CachedSource;
|
|
|
408
408
|
|
|
409
409
|
/***/ }),
|
|
410
410
|
|
|
411
|
-
/***/
|
|
411
|
+
/***/ 844:
|
|
412
412
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
413
413
|
|
|
414
414
|
/*
|
|
@@ -418,7 +418,7 @@ module.exports = CachedSource;
|
|
|
418
418
|
|
|
419
419
|
|
|
420
420
|
|
|
421
|
-
const Source = __nccwpck_require__(
|
|
421
|
+
const Source = __nccwpck_require__(422);
|
|
422
422
|
|
|
423
423
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
424
424
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -520,7 +520,7 @@ module.exports = CompatSource;
|
|
|
520
520
|
|
|
521
521
|
/***/ }),
|
|
522
522
|
|
|
523
|
-
/***/
|
|
523
|
+
/***/ 974:
|
|
524
524
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
525
525
|
|
|
526
526
|
/*
|
|
@@ -530,10 +530,10 @@ module.exports = CompatSource;
|
|
|
530
530
|
|
|
531
531
|
|
|
532
532
|
|
|
533
|
-
const RawSource = __nccwpck_require__(
|
|
534
|
-
const Source = __nccwpck_require__(
|
|
535
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
536
|
-
const streamChunks = __nccwpck_require__(
|
|
533
|
+
const RawSource = __nccwpck_require__(136);
|
|
534
|
+
const Source = __nccwpck_require__(422);
|
|
535
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(875);
|
|
536
|
+
const streamChunks = __nccwpck_require__(779);
|
|
537
537
|
|
|
538
538
|
/** @typedef {import("./CompatSource").SourceLike} SourceLike */
|
|
539
539
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
@@ -921,7 +921,7 @@ module.exports = ConcatSource;
|
|
|
921
921
|
|
|
922
922
|
/***/ }),
|
|
923
923
|
|
|
924
|
-
/***/
|
|
924
|
+
/***/ 837:
|
|
925
925
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
926
926
|
|
|
927
927
|
/*
|
|
@@ -931,14 +931,14 @@ module.exports = ConcatSource;
|
|
|
931
931
|
|
|
932
932
|
|
|
933
933
|
|
|
934
|
-
const Source = __nccwpck_require__(
|
|
935
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
936
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
937
|
-
const splitIntoLines = __nccwpck_require__(
|
|
938
|
-
const splitIntoPotentialTokens = __nccwpck_require__(
|
|
934
|
+
const Source = __nccwpck_require__(422);
|
|
935
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(875);
|
|
936
|
+
const getGeneratedSourceInfo = __nccwpck_require__(517);
|
|
937
|
+
const splitIntoLines = __nccwpck_require__(492);
|
|
938
|
+
const splitIntoPotentialTokens = __nccwpck_require__(403);
|
|
939
939
|
const {
|
|
940
940
|
isDualStringBufferCachingEnabled,
|
|
941
|
-
} = __nccwpck_require__(
|
|
941
|
+
} = __nccwpck_require__(357);
|
|
942
942
|
|
|
943
943
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
944
944
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -1126,7 +1126,7 @@ module.exports = OriginalSource;
|
|
|
1126
1126
|
|
|
1127
1127
|
/***/ }),
|
|
1128
1128
|
|
|
1129
|
-
/***/
|
|
1129
|
+
/***/ 850:
|
|
1130
1130
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1131
1131
|
|
|
1132
1132
|
/*
|
|
@@ -1136,10 +1136,10 @@ module.exports = OriginalSource;
|
|
|
1136
1136
|
|
|
1137
1137
|
|
|
1138
1138
|
|
|
1139
|
-
const RawSource = __nccwpck_require__(
|
|
1140
|
-
const Source = __nccwpck_require__(
|
|
1141
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1142
|
-
const streamChunks = __nccwpck_require__(
|
|
1139
|
+
const RawSource = __nccwpck_require__(136);
|
|
1140
|
+
const Source = __nccwpck_require__(422);
|
|
1141
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(875);
|
|
1142
|
+
const streamChunks = __nccwpck_require__(779);
|
|
1143
1143
|
|
|
1144
1144
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
1145
1145
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -1291,7 +1291,7 @@ module.exports = PrefixSource;
|
|
|
1291
1291
|
|
|
1292
1292
|
/***/ }),
|
|
1293
1293
|
|
|
1294
|
-
/***/
|
|
1294
|
+
/***/ 136:
|
|
1295
1295
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1296
1296
|
|
|
1297
1297
|
/*
|
|
@@ -1301,12 +1301,12 @@ module.exports = PrefixSource;
|
|
|
1301
1301
|
|
|
1302
1302
|
|
|
1303
1303
|
|
|
1304
|
-
const Source = __nccwpck_require__(
|
|
1305
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
1304
|
+
const Source = __nccwpck_require__(422);
|
|
1305
|
+
const streamChunksOfRawSource = __nccwpck_require__(771);
|
|
1306
1306
|
const {
|
|
1307
1307
|
internString,
|
|
1308
1308
|
isDualStringBufferCachingEnabled,
|
|
1309
|
-
} = __nccwpck_require__(
|
|
1309
|
+
} = __nccwpck_require__(357);
|
|
1310
1310
|
|
|
1311
1311
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
1312
1312
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -1434,7 +1434,7 @@ module.exports = RawSource;
|
|
|
1434
1434
|
|
|
1435
1435
|
/***/ }),
|
|
1436
1436
|
|
|
1437
|
-
/***/
|
|
1437
|
+
/***/ 902:
|
|
1438
1438
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1439
1439
|
|
|
1440
1440
|
/*
|
|
@@ -1444,10 +1444,10 @@ module.exports = RawSource;
|
|
|
1444
1444
|
|
|
1445
1445
|
|
|
1446
1446
|
|
|
1447
|
-
const Source = __nccwpck_require__(
|
|
1448
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
1449
|
-
const splitIntoLines = __nccwpck_require__(
|
|
1450
|
-
const streamChunks = __nccwpck_require__(
|
|
1447
|
+
const Source = __nccwpck_require__(422);
|
|
1448
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(875);
|
|
1449
|
+
const splitIntoLines = __nccwpck_require__(492);
|
|
1450
|
+
const streamChunks = __nccwpck_require__(779);
|
|
1451
1451
|
|
|
1452
1452
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
1453
1453
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -1986,7 +1986,7 @@ module.exports.Replacement = Replacement;
|
|
|
1986
1986
|
|
|
1987
1987
|
/***/ }),
|
|
1988
1988
|
|
|
1989
|
-
/***/
|
|
1989
|
+
/***/ 865:
|
|
1990
1990
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1991
1991
|
|
|
1992
1992
|
/*
|
|
@@ -1996,7 +1996,7 @@ module.exports.Replacement = Replacement;
|
|
|
1996
1996
|
|
|
1997
1997
|
|
|
1998
1998
|
|
|
1999
|
-
const Source = __nccwpck_require__(
|
|
1999
|
+
const Source = __nccwpck_require__(422);
|
|
2000
2000
|
|
|
2001
2001
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
2002
2002
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -2060,7 +2060,7 @@ module.exports = SizeOnlySource;
|
|
|
2060
2060
|
|
|
2061
2061
|
/***/ }),
|
|
2062
2062
|
|
|
2063
|
-
/***/
|
|
2063
|
+
/***/ 422:
|
|
2064
2064
|
/***/ ((module) => {
|
|
2065
2065
|
|
|
2066
2066
|
/*
|
|
@@ -2156,7 +2156,7 @@ module.exports = Source;
|
|
|
2156
2156
|
|
|
2157
2157
|
/***/ }),
|
|
2158
2158
|
|
|
2159
|
-
/***/
|
|
2159
|
+
/***/ 147:
|
|
2160
2160
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2161
2161
|
|
|
2162
2162
|
/*
|
|
@@ -2166,13 +2166,13 @@ module.exports = Source;
|
|
|
2166
2166
|
|
|
2167
2167
|
|
|
2168
2168
|
|
|
2169
|
-
const Source = __nccwpck_require__(
|
|
2170
|
-
const { getMap, getSourceAndMap } = __nccwpck_require__(
|
|
2171
|
-
const streamChunksOfCombinedSourceMap = __nccwpck_require__(
|
|
2172
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
2169
|
+
const Source = __nccwpck_require__(422);
|
|
2170
|
+
const { getMap, getSourceAndMap } = __nccwpck_require__(875);
|
|
2171
|
+
const streamChunksOfCombinedSourceMap = __nccwpck_require__(132);
|
|
2172
|
+
const streamChunksOfSourceMap = __nccwpck_require__(105);
|
|
2173
2173
|
const {
|
|
2174
2174
|
isDualStringBufferCachingEnabled,
|
|
2175
|
-
} = __nccwpck_require__(
|
|
2175
|
+
} = __nccwpck_require__(357);
|
|
2176
2176
|
|
|
2177
2177
|
/** @typedef {import("./Source").HashLike} HashLike */
|
|
2178
2178
|
/** @typedef {import("./Source").MapOptions} MapOptions */
|
|
@@ -2529,7 +2529,7 @@ module.exports = SourceMapSource;
|
|
|
2529
2529
|
|
|
2530
2530
|
/***/ }),
|
|
2531
2531
|
|
|
2532
|
-
/***/
|
|
2532
|
+
/***/ 294:
|
|
2533
2533
|
/***/ ((module) => {
|
|
2534
2534
|
|
|
2535
2535
|
/*
|
|
@@ -2761,7 +2761,7 @@ module.exports = createMappingsSerializer;
|
|
|
2761
2761
|
|
|
2762
2762
|
/***/ }),
|
|
2763
2763
|
|
|
2764
|
-
/***/
|
|
2764
|
+
/***/ 875:
|
|
2765
2765
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
2766
2766
|
|
|
2767
2767
|
/*
|
|
@@ -2771,7 +2771,7 @@ module.exports = createMappingsSerializer;
|
|
|
2771
2771
|
|
|
2772
2772
|
|
|
2773
2773
|
|
|
2774
|
-
const createMappingsSerializer = __nccwpck_require__(
|
|
2774
|
+
const createMappingsSerializer = __nccwpck_require__(294);
|
|
2775
2775
|
|
|
2776
2776
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
2777
2777
|
/** @typedef {import("../Source").SourceAndMap} SourceAndMap */
|
|
@@ -2927,7 +2927,7 @@ module.exports.getMap = (source, options) => {
|
|
|
2927
2927
|
|
|
2928
2928
|
/***/ }),
|
|
2929
2929
|
|
|
2930
|
-
/***/
|
|
2930
|
+
/***/ 517:
|
|
2931
2931
|
/***/ ((module) => {
|
|
2932
2932
|
|
|
2933
2933
|
/*
|
|
@@ -2978,7 +2978,7 @@ module.exports = getGeneratedSourceInfo;
|
|
|
2978
2978
|
|
|
2979
2979
|
/***/ }),
|
|
2980
2980
|
|
|
2981
|
-
/***/
|
|
2981
|
+
/***/ 432:
|
|
2982
2982
|
/***/ ((module) => {
|
|
2983
2983
|
|
|
2984
2984
|
/*
|
|
@@ -3009,7 +3009,7 @@ module.exports = getSource;
|
|
|
3009
3009
|
|
|
3010
3010
|
/***/ }),
|
|
3011
3011
|
|
|
3012
|
-
/***/
|
|
3012
|
+
/***/ 950:
|
|
3013
3013
|
/***/ ((module) => {
|
|
3014
3014
|
|
|
3015
3015
|
/*
|
|
@@ -3136,7 +3136,7 @@ module.exports = readMappings;
|
|
|
3136
3136
|
|
|
3137
3137
|
/***/ }),
|
|
3138
3138
|
|
|
3139
|
-
/***/
|
|
3139
|
+
/***/ 492:
|
|
3140
3140
|
/***/ ((module) => {
|
|
3141
3141
|
|
|
3142
3142
|
/*
|
|
@@ -3176,7 +3176,7 @@ module.exports = splitIntoLines;
|
|
|
3176
3176
|
|
|
3177
3177
|
/***/ }),
|
|
3178
3178
|
|
|
3179
|
-
/***/
|
|
3179
|
+
/***/ 403:
|
|
3180
3180
|
/***/ ((module) => {
|
|
3181
3181
|
|
|
3182
3182
|
/*
|
|
@@ -3236,7 +3236,7 @@ module.exports = splitIntoPotentialTokens;
|
|
|
3236
3236
|
|
|
3237
3237
|
/***/ }),
|
|
3238
3238
|
|
|
3239
|
-
/***/
|
|
3239
|
+
/***/ 334:
|
|
3240
3240
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3241
3241
|
|
|
3242
3242
|
/*
|
|
@@ -3246,8 +3246,8 @@ module.exports = splitIntoPotentialTokens;
|
|
|
3246
3246
|
|
|
3247
3247
|
|
|
3248
3248
|
|
|
3249
|
-
const createMappingsSerializer = __nccwpck_require__(
|
|
3250
|
-
const streamChunks = __nccwpck_require__(
|
|
3249
|
+
const createMappingsSerializer = __nccwpck_require__(294);
|
|
3250
|
+
const streamChunks = __nccwpck_require__(779);
|
|
3251
3251
|
|
|
3252
3252
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3253
3253
|
/** @typedef {import("./streamChunks").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -3366,7 +3366,7 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
3366
3366
|
|
|
3367
3367
|
/***/ }),
|
|
3368
3368
|
|
|
3369
|
-
/***/
|
|
3369
|
+
/***/ 779:
|
|
3370
3370
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3371
3371
|
|
|
3372
3372
|
/*
|
|
@@ -3376,8 +3376,8 @@ module.exports = streamAndGetSourceAndMap;
|
|
|
3376
3376
|
|
|
3377
3377
|
|
|
3378
3378
|
|
|
3379
|
-
const streamChunksOfRawSource = __nccwpck_require__(
|
|
3380
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
3379
|
+
const streamChunksOfRawSource = __nccwpck_require__(771);
|
|
3380
|
+
const streamChunksOfSourceMap = __nccwpck_require__(105);
|
|
3381
3381
|
|
|
3382
3382
|
/** @typedef {import("../Source")} Source */
|
|
3383
3383
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -3435,7 +3435,7 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
3435
3435
|
|
|
3436
3436
|
/***/ }),
|
|
3437
3437
|
|
|
3438
|
-
/***/
|
|
3438
|
+
/***/ 132:
|
|
3439
3439
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3440
3440
|
|
|
3441
3441
|
/*
|
|
@@ -3445,8 +3445,8 @@ module.exports = (source, options, onChunk, onSource, onName) => {
|
|
|
3445
3445
|
|
|
3446
3446
|
|
|
3447
3447
|
|
|
3448
|
-
const splitIntoLines = __nccwpck_require__(
|
|
3449
|
-
const streamChunksOfSourceMap = __nccwpck_require__(
|
|
3448
|
+
const splitIntoLines = __nccwpck_require__(492);
|
|
3449
|
+
const streamChunksOfSourceMap = __nccwpck_require__(105);
|
|
3450
3450
|
|
|
3451
3451
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3452
3452
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -3808,7 +3808,7 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
3808
3808
|
|
|
3809
3809
|
/***/ }),
|
|
3810
3810
|
|
|
3811
|
-
/***/
|
|
3811
|
+
/***/ 771:
|
|
3812
3812
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3813
3813
|
|
|
3814
3814
|
/*
|
|
@@ -3818,8 +3818,8 @@ module.exports = streamChunksOfCombinedSourceMap;
|
|
|
3818
3818
|
|
|
3819
3819
|
|
|
3820
3820
|
|
|
3821
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
3822
|
-
const splitIntoLines = __nccwpck_require__(
|
|
3821
|
+
const getGeneratedSourceInfo = __nccwpck_require__(517);
|
|
3822
|
+
const splitIntoLines = __nccwpck_require__(492);
|
|
3823
3823
|
|
|
3824
3824
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
3825
3825
|
/** @typedef {import("./streamChunks").OnChunk} OnChunk */
|
|
@@ -3869,7 +3869,7 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
3869
3869
|
|
|
3870
3870
|
/***/ }),
|
|
3871
3871
|
|
|
3872
|
-
/***/
|
|
3872
|
+
/***/ 105:
|
|
3873
3873
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
3874
3874
|
|
|
3875
3875
|
/*
|
|
@@ -3879,10 +3879,10 @@ module.exports = (source, onChunk, onSource, onName, finalSource) =>
|
|
|
3879
3879
|
|
|
3880
3880
|
|
|
3881
3881
|
|
|
3882
|
-
const getGeneratedSourceInfo = __nccwpck_require__(
|
|
3883
|
-
const getSource = __nccwpck_require__(
|
|
3884
|
-
const readMappings = __nccwpck_require__(
|
|
3885
|
-
const splitIntoLines = __nccwpck_require__(
|
|
3882
|
+
const getGeneratedSourceInfo = __nccwpck_require__(517);
|
|
3883
|
+
const getSource = __nccwpck_require__(432);
|
|
3884
|
+
const readMappings = __nccwpck_require__(950);
|
|
3885
|
+
const splitIntoLines = __nccwpck_require__(492);
|
|
3886
3886
|
|
|
3887
3887
|
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
|
|
3888
3888
|
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
|
|
@@ -4375,7 +4375,7 @@ module.exports = (
|
|
|
4375
4375
|
|
|
4376
4376
|
/***/ }),
|
|
4377
4377
|
|
|
4378
|
-
/***/
|
|
4378
|
+
/***/ 357:
|
|
4379
4379
|
/***/ ((module) => {
|
|
4380
4380
|
|
|
4381
4381
|
/*
|
|
@@ -4499,7 +4499,7 @@ module.exports = {
|
|
|
4499
4499
|
|
|
4500
4500
|
/***/ }),
|
|
4501
4501
|
|
|
4502
|
-
/***/
|
|
4502
|
+
/***/ 339:
|
|
4503
4503
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4504
4504
|
|
|
4505
4505
|
/*
|
|
@@ -4586,38 +4586,38 @@ module.exports = mergeExports(
|
|
|
4586
4586
|
{},
|
|
4587
4587
|
{
|
|
4588
4588
|
get Source() {
|
|
4589
|
-
return __nccwpck_require__(
|
|
4589
|
+
return __nccwpck_require__(422);
|
|
4590
4590
|
},
|
|
4591
4591
|
get RawSource() {
|
|
4592
|
-
return __nccwpck_require__(
|
|
4592
|
+
return __nccwpck_require__(136);
|
|
4593
4593
|
},
|
|
4594
4594
|
get OriginalSource() {
|
|
4595
|
-
return __nccwpck_require__(
|
|
4595
|
+
return __nccwpck_require__(837);
|
|
4596
4596
|
},
|
|
4597
4597
|
get SourceMapSource() {
|
|
4598
|
-
return __nccwpck_require__(
|
|
4598
|
+
return __nccwpck_require__(147);
|
|
4599
4599
|
},
|
|
4600
4600
|
get CachedSource() {
|
|
4601
|
-
return __nccwpck_require__(
|
|
4601
|
+
return __nccwpck_require__(780);
|
|
4602
4602
|
},
|
|
4603
4603
|
get ConcatSource() {
|
|
4604
|
-
return __nccwpck_require__(
|
|
4604
|
+
return __nccwpck_require__(974);
|
|
4605
4605
|
},
|
|
4606
4606
|
get ReplaceSource() {
|
|
4607
|
-
return __nccwpck_require__(
|
|
4607
|
+
return __nccwpck_require__(902);
|
|
4608
4608
|
},
|
|
4609
4609
|
get PrefixSource() {
|
|
4610
|
-
return __nccwpck_require__(
|
|
4610
|
+
return __nccwpck_require__(850);
|
|
4611
4611
|
},
|
|
4612
4612
|
get SizeOnlySource() {
|
|
4613
|
-
return __nccwpck_require__(
|
|
4613
|
+
return __nccwpck_require__(865);
|
|
4614
4614
|
},
|
|
4615
4615
|
get CompatSource() {
|
|
4616
|
-
return __nccwpck_require__(
|
|
4616
|
+
return __nccwpck_require__(844);
|
|
4617
4617
|
},
|
|
4618
4618
|
util: {
|
|
4619
4619
|
get stringBufferUtils() {
|
|
4620
|
-
return __nccwpck_require__(
|
|
4620
|
+
return __nccwpck_require__(357);
|
|
4621
4621
|
},
|
|
4622
4622
|
},
|
|
4623
4623
|
},
|
|
@@ -4668,7 +4668,7 @@ module.exports = mergeExports(
|
|
|
4668
4668
|
/******/ // startup
|
|
4669
4669
|
/******/ // Load entry module and return exports
|
|
4670
4670
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
4671
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
|
4671
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(339);
|
|
4672
4672
|
/******/ module.exports = __webpack_exports__;
|
|
4673
4673
|
/******/
|
|
4674
4674
|
/******/ })()
|
package/dist/Resolver.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import type binding from "@rspack/binding";
|
|
2
2
|
import type { ResolveCallback } from "./config/adapterRuleUse";
|
|
3
|
-
type ResolveContext = {
|
|
3
|
+
export type ResolveContext = {
|
|
4
|
+
contextDependencies?: {
|
|
5
|
+
add: (context: string) => void;
|
|
6
|
+
};
|
|
7
|
+
missingDependencies?: {
|
|
8
|
+
add: (dependency: string) => void;
|
|
9
|
+
};
|
|
10
|
+
fileDependencies?: {
|
|
11
|
+
add: (dependency: string) => void;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
4
14
|
export type ResourceData = binding.JsResourceData;
|
|
5
15
|
export interface ResolveRequest {
|
|
6
16
|
path: string;
|
|
@@ -8,6 +18,9 @@ export interface ResolveRequest {
|
|
|
8
18
|
fragment: string;
|
|
9
19
|
descriptionFileData?: string;
|
|
10
20
|
descriptionFilePath?: string;
|
|
21
|
+
fileDependencies?: string[];
|
|
22
|
+
missingDependencies?: string[];
|
|
23
|
+
contextDependencies?: string[];
|
|
11
24
|
}
|
|
12
25
|
export declare class Resolver {
|
|
13
26
|
#private;
|
|
@@ -15,4 +28,3 @@ export declare class Resolver {
|
|
|
15
28
|
resolveSync(context: object, path: string, request: string): string | false;
|
|
16
29
|
resolve(context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void;
|
|
17
30
|
}
|
|
18
|
-
export {};
|
|
@@ -111,6 +111,9 @@ export interface ExperimentsNormalized {
|
|
|
111
111
|
*/
|
|
112
112
|
layers?: boolean;
|
|
113
113
|
incremental?: false | Incremental;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated This option is deprecated, as it has a huge regression in some edge cases where the chunk graph has lots of cycles. We will improve performance of build_chunk_graph.
|
|
116
|
+
*/
|
|
114
117
|
parallelCodeSplitting?: boolean;
|
|
115
118
|
futureDefaults?: boolean;
|
|
116
119
|
rspackFuture?: RspackFutureOptions;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -2100,6 +2100,7 @@ export type Experiments = {
|
|
|
2100
2100
|
incremental?: IncrementalPresets | Incremental;
|
|
2101
2101
|
/**
|
|
2102
2102
|
* Enable multi-threaded code splitting algorithm.
|
|
2103
|
+
* @deprecated This option is deprecated, it has a huge regression in some edge cases where the chunk graph has lots of cycles. We'll improve the performance of build_chunk_graph in the future instead
|
|
2103
2104
|
*/
|
|
2104
2105
|
parallelCodeSplitting?: boolean;
|
|
2105
2106
|
/**
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
import { RspackBuiltinPlugin } from "../builtin-plugin/base";
|
|
3
|
+
import type { Compiler } from "../Compiler";
|
|
4
|
+
export type RemoteAliasMap = Record<string, {
|
|
5
|
+
name: string;
|
|
6
|
+
entry?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type ManifestExposeOption = {
|
|
9
|
+
path: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export type ManifestSharedOption = {
|
|
13
|
+
name: string;
|
|
14
|
+
version?: string;
|
|
15
|
+
requiredVersion?: string;
|
|
16
|
+
singleton?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type ModuleFederationManifestPluginOptions = {
|
|
19
|
+
name?: string;
|
|
20
|
+
globalName?: string;
|
|
21
|
+
filePath?: string;
|
|
22
|
+
disableAssetsAnalyze?: boolean;
|
|
23
|
+
fileName?: string;
|
|
24
|
+
remoteAliasMap?: RemoteAliasMap;
|
|
25
|
+
exposes?: ManifestExposeOption[];
|
|
26
|
+
shared?: ManifestSharedOption[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* JS-side post-processing plugin: reads mf-manifest.json and mf-stats.json, executes additionalData callback and merges/overwrites manifest.
|
|
30
|
+
* To avoid cross-NAPI callback complexity, this plugin runs at the afterProcessAssets stage to ensure Rust-side MfManifestPlugin has already output its artifacts.
|
|
31
|
+
*/
|
|
32
|
+
export declare class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
|
|
33
|
+
name: BuiltinPluginName;
|
|
34
|
+
private opts;
|
|
35
|
+
constructor(opts: ModuleFederationManifestPluginOptions);
|
|
36
|
+
raw(compiler: Compiler): BuiltinPlugin;
|
|
37
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { Compiler } from "../Compiler";
|
|
2
|
+
import { type ModuleFederationManifestPluginOptions } from "./ModuleFederationManifestPlugin";
|
|
2
3
|
import type { ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1";
|
|
3
4
|
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> {
|
|
4
5
|
runtimePlugins?: RuntimePlugins;
|
|
5
6
|
implementation?: string;
|
|
6
7
|
shareStrategy?: "version-first" | "loaded-first";
|
|
8
|
+
manifest?: boolean | Omit<ModuleFederationManifestPluginOptions, "remoteAliasMap" | "globalName" | "name" | "exposes" | "shared">;
|
|
7
9
|
}
|
|
8
10
|
export type RuntimePlugins = string[] | [string, Record<string, unknown>][];
|
|
9
11
|
export declare class ModuleFederationPlugin {
|
package/dist/index.js
CHANGED
|
@@ -243,21 +243,6 @@ var __webpack_modules__ = {
|
|
|
243
243
|
},
|
|
244
244
|
process: function(module1) {
|
|
245
245
|
module1.exports = require("process");
|
|
246
|
-
},
|
|
247
|
-
tinypool: function(module1) {
|
|
248
|
-
module1.exports = import("../compiled/tinypool/dist/index.js").then(function(module1) {
|
|
249
|
-
return module1;
|
|
250
|
-
});
|
|
251
|
-
},
|
|
252
|
-
"node:inspector": function(module1) {
|
|
253
|
-
module1.exports = import("node:inspector").then(function(module1) {
|
|
254
|
-
return module1;
|
|
255
|
-
});
|
|
256
|
-
},
|
|
257
|
-
"node:worker_threads": function(module1) {
|
|
258
|
-
module1.exports = import("node:worker_threads").then(function(module1) {
|
|
259
|
-
return module1;
|
|
260
|
-
});
|
|
261
246
|
}
|
|
262
247
|
}, __webpack_module_cache__ = {};
|
|
263
248
|
function __webpack_require__(moduleId) {
|
|
@@ -2653,7 +2638,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2653
2638
|
static session;
|
|
2654
2639
|
static counter = 10000;
|
|
2655
2640
|
static async initJavaScriptTrace(layer, output) {
|
|
2656
|
-
let { Session } = await
|
|
2641
|
+
let { Session } = await import("node:inspector");
|
|
2657
2642
|
this.session = new Session(), this.layer = layer, this.output = output, this.events = [], this.state = "on", this.startTime = process.hrtime.bigint();
|
|
2658
2643
|
}
|
|
2659
2644
|
static uuid() {
|
|
@@ -2960,7 +2945,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2960
2945
|
super(ModuleError_createMessage(err, "Warning", from)), this.name = "ModuleWarning", this.error = err, this.details = getErrorDetails(err);
|
|
2961
2946
|
}
|
|
2962
2947
|
}
|
|
2963
|
-
let ensureLoaderWorkerPool = async ()=>service_pool || (service_pool =
|
|
2948
|
+
let ensureLoaderWorkerPool = async ()=>service_pool || (service_pool = import("../compiled/tinypool/dist/index.js").then(({ Tinypool })=>{
|
|
2964
2949
|
let availableThreads = Math.max(__webpack_require__("node:os").cpus().length - 1, 1);
|
|
2965
2950
|
return new Tinypool({
|
|
2966
2951
|
filename: external_node_path_default().resolve(__dirname, "worker.js"),
|
|
@@ -2984,7 +2969,7 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
2984
2969
|
throw Error("Failed to serialize error, only string, Error instances and objects with a message property are supported");
|
|
2985
2970
|
}
|
|
2986
2971
|
let service_run = async (loaderName, task, options)=>ensureLoaderWorkerPool().then(async (pool)=>{
|
|
2987
|
-
let { MessageChannel } = await
|
|
2972
|
+
let { MessageChannel } = await import("node:worker_threads"), { port1: mainPort, port2: workerPort } = new MessageChannel(), { port1: mainSyncPort, port2: workerSyncPort } = new MessageChannel();
|
|
2988
2973
|
return new Promise((resolve, reject)=>{
|
|
2989
2974
|
let handleError = (error)=>{
|
|
2990
2975
|
mainPort.close(), mainSyncPort.close(), reject(error);
|
|
@@ -5747,7 +5732,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5747
5732
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
5748
5733
|
F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "deferImport", !1), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
|
|
5749
5734
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
5750
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.
|
|
5735
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.2"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
5751
5736
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
|
|
5752
5737
|
if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, { usedExports, inlineConst, deferImport })=>{
|
|
5753
5738
|
D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
|
|
@@ -6356,7 +6341,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6356
6341
|
plugins: nestedArray(config.plugins, (p)=>[
|
|
6357
6342
|
...p
|
|
6358
6343
|
]),
|
|
6359
|
-
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")(), {
|
|
6344
|
+
experiments: nestedConfig(config.experiments, (experiments)=>(experiments.layers && external_node_util_default().deprecate(()=>{}, "`experiments.layers` config has been deprecated and will be removed in Rspack v2.0. Feature layers will be always enabled. Please remove this option from your Rspack configuration.")(), !1 === experiments.topLevelAwait && external_node_util_default().deprecate(()=>{}, "`experiments.topLevelAwait` config has been deprecated and will be removed in Rspack v2.0. Top-level await will be always enabled. Please remove this option from your Rspack configuration.")(), experiments.parallelCodeSplitting && external_node_util_default().deprecate(()=>{}, "`experiments.parallelCodeSplitting` config has been deprecated and will be removed in next minor. It has huge regression in some edge cases where the chunk graph has lots of cycles, we'll improve the performance of build_chunk_graph in the future instead")(), {
|
|
6360
6345
|
...experiments,
|
|
6361
6346
|
cache: optionalNestedConfig(experiments.cache, (cache)=>{
|
|
6362
6347
|
if ("boolean" == typeof cache || "memory" === cache.type) return cache;
|
|
@@ -7000,7 +6985,11 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7000
6985
|
this.#binding.resolve(path, request, (error, text)=>{
|
|
7001
6986
|
if (error) return void callback(error);
|
|
7002
6987
|
let req = text ? JSON.parse(text) : void 0;
|
|
7003
|
-
|
|
6988
|
+
req?.fileDependencies && req.fileDependencies.forEach((file)=>{
|
|
6989
|
+
resolveContext.fileDependencies?.add(file);
|
|
6990
|
+
}), req?.missingDependencies && req.missingDependencies.forEach((missing)=>{
|
|
6991
|
+
resolveContext.missingDependencies?.add(missing);
|
|
6992
|
+
}), callback(error, !!req && `${req.path.replace(/#/g, "\u200b#")}${req.query.replace(/#/g, "\u200b#")}${req.fragment}`, req);
|
|
7004
6993
|
});
|
|
7005
6994
|
}
|
|
7006
6995
|
}
|
|
@@ -7393,7 +7382,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7393
7382
|
});
|
|
7394
7383
|
}
|
|
7395
7384
|
}
|
|
7396
|
-
let CORE_VERSION = "1.6.
|
|
7385
|
+
let CORE_VERSION = "1.6.2", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
7397
7386
|
|
|
7398
7387
|
Help:
|
|
7399
7388
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -8686,7 +8675,7 @@ Help:
|
|
|
8686
8675
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8687
8676
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8688
8677
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8689
|
-
}), childOptions.version && (obj.rspackVersion = "1.6.
|
|
8678
|
+
}), childOptions.version && (obj.rspackVersion = "1.6.2", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
8690
8679
|
let mapError = (j, obj)=>({
|
|
8691
8680
|
...obj,
|
|
8692
8681
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -9585,7 +9574,7 @@ Help:
|
|
|
9585
9574
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9586
9575
|
},
|
|
9587
9576
|
version: (object)=>{
|
|
9588
|
-
object.version = "5.75.0", object.rspackVersion = "1.6.
|
|
9577
|
+
object.version = "5.75.0", object.rspackVersion = "1.6.2";
|
|
9589
9578
|
},
|
|
9590
9579
|
env: (object, _compilation, _context, { _env })=>{
|
|
9591
9580
|
object.env = _env;
|
|
@@ -11426,6 +11415,68 @@ Help:
|
|
|
11426
11415
|
});
|
|
11427
11416
|
}
|
|
11428
11417
|
}
|
|
11418
|
+
let VERSION_PATTERN_REGEXP = /^([\d^=v<>~]|[*xX]$)/;
|
|
11419
|
+
function isRequiredVersion(str) {
|
|
11420
|
+
return VERSION_PATTERN_REGEXP.test(str);
|
|
11421
|
+
}
|
|
11422
|
+
let MANIFEST_FILE_NAME = "mf-manifest.json", STATS_FILE_NAME = "mf-stats.json", JSON_EXT = ".json";
|
|
11423
|
+
function isPlainObject(value) {
|
|
11424
|
+
return !!value && "object" == typeof value && !Array.isArray(value);
|
|
11425
|
+
}
|
|
11426
|
+
class ModuleFederationManifestPlugin extends RspackBuiltinPlugin {
|
|
11427
|
+
name = binding_.BuiltinPluginName.ModuleFederationManifestPlugin;
|
|
11428
|
+
opts;
|
|
11429
|
+
constructor(opts){
|
|
11430
|
+
super(), this.opts = opts;
|
|
11431
|
+
}
|
|
11432
|
+
raw(compiler) {
|
|
11433
|
+
var isDev;
|
|
11434
|
+
let pkg, buildVersion, { fileName, filePath, disableAssetsAnalyze, remoteAliasMap, exposes, shared } = this.opts, { statsFileName, manifestFileName } = function(manifestOptions) {
|
|
11435
|
+
var name;
|
|
11436
|
+
if (!manifestOptions) return {
|
|
11437
|
+
statsFileName: STATS_FILE_NAME,
|
|
11438
|
+
manifestFileName: MANIFEST_FILE_NAME
|
|
11439
|
+
};
|
|
11440
|
+
let filePath = "boolean" == typeof manifestOptions ? "" : manifestOptions.filePath || "", fileName = "boolean" == typeof manifestOptions ? "" : manifestOptions.fileName || "", manifestFileName = fileName ? (name = fileName).endsWith(JSON_EXT) ? name : `${name}${JSON_EXT}` : MANIFEST_FILE_NAME, statsFileName = fileName ? manifestFileName.replace(JSON_EXT, `-stats${JSON_EXT}`) : STATS_FILE_NAME;
|
|
11441
|
+
return {
|
|
11442
|
+
statsFileName: (0, external_node_path_namespaceObject.join)(filePath, statsFileName),
|
|
11443
|
+
manifestFileName: (0, external_node_path_namespaceObject.join)(filePath, manifestFileName)
|
|
11444
|
+
};
|
|
11445
|
+
}(this.opts), rawOptions = {
|
|
11446
|
+
name: this.opts.name,
|
|
11447
|
+
globalName: this.opts.globalName,
|
|
11448
|
+
fileName,
|
|
11449
|
+
filePath,
|
|
11450
|
+
manifestFileName,
|
|
11451
|
+
statsFileName,
|
|
11452
|
+
disableAssetsAnalyze,
|
|
11453
|
+
remoteAliasMap,
|
|
11454
|
+
exposes,
|
|
11455
|
+
shared,
|
|
11456
|
+
buildInfo: (isDev = "development" === compiler.options.mode, pkg = function(root) {
|
|
11457
|
+
let base = root ? (0, external_node_path_namespaceObject.resolve)(root) : process.cwd(), pkgPath = (0, external_node_path_namespaceObject.join)(base, "package.json");
|
|
11458
|
+
try {
|
|
11459
|
+
let content = (0, external_node_fs_namespaceObject.readFileSync)(pkgPath, "utf-8"), parsed = function(input, guard) {
|
|
11460
|
+
try {
|
|
11461
|
+
let parsed = JSON.parse(input);
|
|
11462
|
+
if (guard(parsed)) return parsed;
|
|
11463
|
+
} catch {}
|
|
11464
|
+
}(content, isPlainObject);
|
|
11465
|
+
if (parsed) {
|
|
11466
|
+
let filtered = {};
|
|
11467
|
+
for (let [key, value] of Object.entries(parsed))"string" == typeof value && (filtered[key] = value);
|
|
11468
|
+
if (Object.keys(filtered).length > 0) return filtered;
|
|
11469
|
+
}
|
|
11470
|
+
} catch {}
|
|
11471
|
+
return {};
|
|
11472
|
+
}(compiler.context || process.cwd()), buildVersion = isDev ? "local" : pkg?.version, {
|
|
11473
|
+
buildVersion: process.env.MF_BUILD_VERSION || buildVersion || "UNKNOWN",
|
|
11474
|
+
buildName: process.env.MF_BUILD_NAME || pkg?.name || "UNKNOWN"
|
|
11475
|
+
})
|
|
11476
|
+
};
|
|
11477
|
+
return createBuiltinPlugin(this.name, rawOptions);
|
|
11478
|
+
}
|
|
11479
|
+
}
|
|
11429
11480
|
let ModuleFederationRuntimePlugin = base_create(binding_.BuiltinPluginName.ModuleFederationRuntimePlugin, (options = {})=>options), parseOptions = (options, normalizeSimple, normalizeOptions)=>{
|
|
11430
11481
|
let items = [];
|
|
11431
11482
|
var options1 = options, normalizeSimple1 = normalizeSimple, normalizeOptions1 = normalizeOptions, fn = (key, value)=>{
|
|
@@ -11445,7 +11496,63 @@ Help:
|
|
|
11445
11496
|
} else if ("object" == typeof options1) object(options1);
|
|
11446
11497
|
else throw Error("Unexpected options format");
|
|
11447
11498
|
return items;
|
|
11448
|
-
}
|
|
11499
|
+
};
|
|
11500
|
+
function getRemoteInfos(options) {
|
|
11501
|
+
if (!options.remotes) return {};
|
|
11502
|
+
let remoteType = options.remoteType || (options.library ? options.library.type : "script"), remotes = parseOptions(options.remotes, (item)=>({
|
|
11503
|
+
external: Array.isArray(item) ? item : [
|
|
11504
|
+
item
|
|
11505
|
+
],
|
|
11506
|
+
shareScope: options.shareScope || "default"
|
|
11507
|
+
}), (item)=>({
|
|
11508
|
+
external: Array.isArray(item.external) ? item.external : [
|
|
11509
|
+
item.external
|
|
11510
|
+
],
|
|
11511
|
+
shareScope: item.shareScope || options.shareScope || "default"
|
|
11512
|
+
})), remoteInfos = {};
|
|
11513
|
+
for (let [key, config] of remotes)for (let external of config.external){
|
|
11514
|
+
let [externalType, externalRequest] = function(external) {
|
|
11515
|
+
let result = function(external) {
|
|
11516
|
+
if (/^[a-z0-9-]+ /.test(external)) {
|
|
11517
|
+
let idx = external.indexOf(" ");
|
|
11518
|
+
return [
|
|
11519
|
+
external.slice(0, idx),
|
|
11520
|
+
external.slice(idx + 1)
|
|
11521
|
+
];
|
|
11522
|
+
}
|
|
11523
|
+
return null;
|
|
11524
|
+
}(external);
|
|
11525
|
+
return null === result ? [
|
|
11526
|
+
remoteType,
|
|
11527
|
+
external
|
|
11528
|
+
] : result;
|
|
11529
|
+
}(external);
|
|
11530
|
+
if (remoteInfos[key] ??= [], "script" === externalType) {
|
|
11531
|
+
let [url, global] = function(urlAndGlobal) {
|
|
11532
|
+
let index = urlAndGlobal.indexOf("@");
|
|
11533
|
+
return index <= 0 || index === urlAndGlobal.length - 1 ? null : [
|
|
11534
|
+
urlAndGlobal.substring(index + 1),
|
|
11535
|
+
urlAndGlobal.substring(0, index)
|
|
11536
|
+
];
|
|
11537
|
+
}(externalRequest);
|
|
11538
|
+
remoteInfos[key].push({
|
|
11539
|
+
alias: key,
|
|
11540
|
+
name: global,
|
|
11541
|
+
entry: url,
|
|
11542
|
+
externalType,
|
|
11543
|
+
shareScope: config.shareScope
|
|
11544
|
+
});
|
|
11545
|
+
} else remoteInfos[key].push({
|
|
11546
|
+
alias: key,
|
|
11547
|
+
name: void 0,
|
|
11548
|
+
entry: void 0,
|
|
11549
|
+
externalType,
|
|
11550
|
+
shareScope: config.shareScope
|
|
11551
|
+
});
|
|
11552
|
+
}
|
|
11553
|
+
return remoteInfos;
|
|
11554
|
+
}
|
|
11555
|
+
let compilerSet = new WeakSet();
|
|
11449
11556
|
class ShareRuntimePlugin extends RspackBuiltinPlugin {
|
|
11450
11557
|
enhanced;
|
|
11451
11558
|
name = binding_.BuiltinPluginName.ShareRuntimePlugin;
|
|
@@ -11457,16 +11564,14 @@ Help:
|
|
|
11457
11564
|
if (compiler1 = compiler, !compilerSet.has(compiler1)) return compiler2 = compiler, compilerSet.add(compiler2), createBuiltinPlugin(this.name, this.enhanced);
|
|
11458
11565
|
}
|
|
11459
11566
|
}
|
|
11460
|
-
let VERSION_PATTERN_REGEXP = /^([\d^=v<>~]|[*xX]$)/;
|
|
11461
11567
|
class ConsumeSharedPlugin extends RspackBuiltinPlugin {
|
|
11462
11568
|
name = binding_.BuiltinPluginName.ConsumeSharedPlugin;
|
|
11463
11569
|
_options;
|
|
11464
11570
|
constructor(options){
|
|
11465
11571
|
super(), this._options = {
|
|
11466
11572
|
consumes: parseOptions(options.consumes, (item, key)=>{
|
|
11467
|
-
var str;
|
|
11468
11573
|
if (Array.isArray(item)) throw Error("Unexpected array in options");
|
|
11469
|
-
return item !== key && (
|
|
11574
|
+
return item !== key && isRequiredVersion(item) ? {
|
|
11470
11575
|
import: key,
|
|
11471
11576
|
shareScope: options.shareScope || "default",
|
|
11472
11577
|
shareKey: key,
|
|
@@ -11554,9 +11659,8 @@ Help:
|
|
|
11554
11659
|
_enhanced;
|
|
11555
11660
|
constructor(options){
|
|
11556
11661
|
const sharedOptions = parseOptions(options.shared, (item, key)=>{
|
|
11557
|
-
var str;
|
|
11558
11662
|
if ("string" != typeof item) throw Error("Unexpected array in shared");
|
|
11559
|
-
return item !== key && (
|
|
11663
|
+
return item !== key && isRequiredVersion(item) ? {
|
|
11560
11664
|
import: key,
|
|
11561
11665
|
requiredVersion: item
|
|
11562
11666
|
} : {
|
|
@@ -11689,7 +11793,7 @@ Help:
|
|
|
11689
11793
|
let _options = JSON.stringify(options || {});
|
|
11690
11794
|
return binding_default().transform(source, _options);
|
|
11691
11795
|
}
|
|
11692
|
-
let exports_rspackVersion = "1.6.
|
|
11796
|
+
let exports_rspackVersion = "1.6.2", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
11693
11797
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
11694
11798
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
11695
11799
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -11750,67 +11854,13 @@ Help:
|
|
|
11750
11854
|
bundlerRuntime: bundlerRuntimePath,
|
|
11751
11855
|
runtime: runtimePath
|
|
11752
11856
|
});
|
|
11753
|
-
compiler.options.resolve.alias = {
|
|
11857
|
+
if (compiler.options.resolve.alias = {
|
|
11754
11858
|
"@module-federation/runtime-tools": paths.runtimeTools,
|
|
11755
11859
|
"@module-federation/runtime": paths.runtime,
|
|
11756
11860
|
...compiler.options.resolve.alias
|
|
11757
11861
|
}, new ModuleFederationRuntimePlugin({
|
|
11758
11862
|
entryRuntime: function(paths, options, compiler) {
|
|
11759
|
-
let runtimePlugins = options.runtimePlugins ?? [], remoteInfos =
|
|
11760
|
-
if (!options.remotes) return {};
|
|
11761
|
-
let remoteType = options.remoteType || (options.library ? options.library.type : "script"), remotes = parseOptions(options.remotes, (item)=>({
|
|
11762
|
-
external: Array.isArray(item) ? item : [
|
|
11763
|
-
item
|
|
11764
|
-
],
|
|
11765
|
-
shareScope: options.shareScope || "default"
|
|
11766
|
-
}), (item)=>({
|
|
11767
|
-
external: Array.isArray(item.external) ? item.external : [
|
|
11768
|
-
item.external
|
|
11769
|
-
],
|
|
11770
|
-
shareScope: item.shareScope || options.shareScope || "default"
|
|
11771
|
-
})), remoteInfos = {};
|
|
11772
|
-
for (let [key, config] of remotes)for (let external of config.external){
|
|
11773
|
-
let [externalType, externalRequest] = function(external) {
|
|
11774
|
-
let result = function(external) {
|
|
11775
|
-
if (/^[a-z0-9-]+ /.test(external)) {
|
|
11776
|
-
let idx = external.indexOf(" ");
|
|
11777
|
-
return [
|
|
11778
|
-
external.slice(0, idx),
|
|
11779
|
-
external.slice(idx + 1)
|
|
11780
|
-
];
|
|
11781
|
-
}
|
|
11782
|
-
return null;
|
|
11783
|
-
}(external);
|
|
11784
|
-
return null === result ? [
|
|
11785
|
-
remoteType,
|
|
11786
|
-
external
|
|
11787
|
-
] : result;
|
|
11788
|
-
}(external);
|
|
11789
|
-
if (remoteInfos[key] ??= [], "script" === externalType) {
|
|
11790
|
-
let [url, global] = function(urlAndGlobal) {
|
|
11791
|
-
let index = urlAndGlobal.indexOf("@");
|
|
11792
|
-
return index <= 0 || index === urlAndGlobal.length - 1 ? null : [
|
|
11793
|
-
urlAndGlobal.substring(index + 1),
|
|
11794
|
-
urlAndGlobal.substring(0, index)
|
|
11795
|
-
];
|
|
11796
|
-
}(externalRequest);
|
|
11797
|
-
remoteInfos[key].push({
|
|
11798
|
-
alias: key,
|
|
11799
|
-
name: global,
|
|
11800
|
-
entry: url,
|
|
11801
|
-
externalType,
|
|
11802
|
-
shareScope: config.shareScope
|
|
11803
|
-
});
|
|
11804
|
-
} else remoteInfos[key].push({
|
|
11805
|
-
alias: key,
|
|
11806
|
-
name: void 0,
|
|
11807
|
-
entry: void 0,
|
|
11808
|
-
externalType,
|
|
11809
|
-
shareScope: config.shareScope
|
|
11810
|
-
});
|
|
11811
|
-
}
|
|
11812
|
-
return remoteInfos;
|
|
11813
|
-
}(options), runtimePluginImports = [], runtimePluginVars = [];
|
|
11863
|
+
let runtimePlugins = options.runtimePlugins ?? [], remoteInfos = getRemoteInfos(options), runtimePluginImports = [], runtimePluginVars = [];
|
|
11814
11864
|
for(let i = 0; i < runtimePlugins.length; i++){
|
|
11815
11865
|
let runtimePluginVar = `__module_federation_runtime_plugin_${i}__`, pluginSpec = runtimePlugins[i], pluginPath = Array.isArray(pluginSpec) ? pluginSpec[0] : pluginSpec, pluginParams = Array.isArray(pluginSpec) ? pluginSpec[1] : void 0;
|
|
11816
11866
|
runtimePluginImports.push(`import ${runtimePluginVar} from ${JSON.stringify(pluginPath)}`);
|
|
@@ -11831,7 +11881,74 @@ Help:
|
|
|
11831
11881
|
}).apply(compiler), new webpack.container.ModuleFederationPluginV1({
|
|
11832
11882
|
...this._options,
|
|
11833
11883
|
enhanced: !0
|
|
11834
|
-
}).apply(compiler)
|
|
11884
|
+
}).apply(compiler), this._options.manifest) {
|
|
11885
|
+
let manifestOptions = !0 === this._options.manifest ? {} : {
|
|
11886
|
+
...this._options.manifest
|
|
11887
|
+
}, containerName = manifestOptions.name ?? this._options.name, globalName = manifestOptions.globalName ?? function(library) {
|
|
11888
|
+
if (!library) return;
|
|
11889
|
+
let libName = library.name;
|
|
11890
|
+
if (libName) {
|
|
11891
|
+
if ("string" == typeof libName) return libName;
|
|
11892
|
+
if (Array.isArray(libName)) return libName[0];
|
|
11893
|
+
if ("object" == typeof libName) return libName.root?.[0] ?? libName.amd ?? libName.commonjs ?? void 0;
|
|
11894
|
+
}
|
|
11895
|
+
}(this._options.library) ?? containerName, remoteAliasMap = Object.entries(getRemoteInfos(this._options)).reduce((sum, cur)=>{
|
|
11896
|
+
if (cur[1].length > 1) return sum;
|
|
11897
|
+
let { entry, alias, name } = cur[1][0];
|
|
11898
|
+
return entry && name && (sum[alias] = {
|
|
11899
|
+
name,
|
|
11900
|
+
entry
|
|
11901
|
+
}), sum;
|
|
11902
|
+
}, {}), manifestExposes = function(exposes) {
|
|
11903
|
+
if (!exposes) return;
|
|
11904
|
+
let result = parseOptions(exposes, (value, key)=>({
|
|
11905
|
+
import: Array.isArray(value) ? value : [
|
|
11906
|
+
value
|
|
11907
|
+
],
|
|
11908
|
+
name: void 0
|
|
11909
|
+
}), (value)=>({
|
|
11910
|
+
import: Array.isArray(value.import) ? value.import : [
|
|
11911
|
+
value.import
|
|
11912
|
+
],
|
|
11913
|
+
name: value.name ?? void 0
|
|
11914
|
+
})).map(([exposeKey, info])=>{
|
|
11915
|
+
let exposeName = info.name ?? exposeKey.replace(/^\.\//, "");
|
|
11916
|
+
return {
|
|
11917
|
+
path: exposeKey,
|
|
11918
|
+
name: exposeName
|
|
11919
|
+
};
|
|
11920
|
+
});
|
|
11921
|
+
return result.length > 0 ? result : void 0;
|
|
11922
|
+
}(this._options.exposes);
|
|
11923
|
+
void 0 === manifestOptions.exposes && manifestExposes && (manifestOptions.exposes = manifestExposes);
|
|
11924
|
+
let manifestShared = function(shared) {
|
|
11925
|
+
if (!shared) return;
|
|
11926
|
+
let result = parseOptions(shared, (item, key)=>{
|
|
11927
|
+
if ("string" != typeof item) throw Error("Unexpected array in shared");
|
|
11928
|
+
return item !== key && isRequiredVersion(item) ? {
|
|
11929
|
+
import: key,
|
|
11930
|
+
requiredVersion: item
|
|
11931
|
+
} : {
|
|
11932
|
+
import: item
|
|
11933
|
+
};
|
|
11934
|
+
}, (item)=>item).map(([key, config])=>{
|
|
11935
|
+
let name = config.shareKey || key, version = "string" == typeof config.version ? config.version : void 0;
|
|
11936
|
+
return {
|
|
11937
|
+
name,
|
|
11938
|
+
version,
|
|
11939
|
+
requiredVersion: "string" == typeof config.requiredVersion ? config.requiredVersion : void 0,
|
|
11940
|
+
singleton: config.singleton
|
|
11941
|
+
};
|
|
11942
|
+
});
|
|
11943
|
+
return result.length > 0 ? result : void 0;
|
|
11944
|
+
}(this._options.shared);
|
|
11945
|
+
void 0 === manifestOptions.shared && manifestShared && (manifestOptions.shared = manifestShared), new ModuleFederationManifestPlugin({
|
|
11946
|
+
...manifestOptions,
|
|
11947
|
+
name: containerName,
|
|
11948
|
+
globalName,
|
|
11949
|
+
remoteAliasMap
|
|
11950
|
+
}).apply(compiler);
|
|
11951
|
+
}
|
|
11835
11952
|
}
|
|
11836
11953
|
},
|
|
11837
11954
|
ModuleFederationPluginV1: class {
|
package/dist/worker.js
CHANGED
|
@@ -433,16 +433,6 @@ var __webpack_modules__ = {
|
|
|
433
433
|
},
|
|
434
434
|
"node:util": function(module) {
|
|
435
435
|
module.exports = require("node:util");
|
|
436
|
-
},
|
|
437
|
-
tinypool: function(module) {
|
|
438
|
-
module.exports = import("../compiled/tinypool/dist/index.js").then(function(module) {
|
|
439
|
-
return module;
|
|
440
|
-
});
|
|
441
|
-
},
|
|
442
|
-
"node:worker_threads": function(module) {
|
|
443
|
-
module.exports = import("node:worker_threads").then(function(module) {
|
|
444
|
-
return module;
|
|
445
|
-
});
|
|
446
436
|
}
|
|
447
437
|
}, __webpack_module_cache__ = {};
|
|
448
438
|
function __webpack_require__(moduleId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"directory": "packages/rspack"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@ast-grep/napi": "^0.39.
|
|
40
|
+
"@ast-grep/napi": "^0.39.9",
|
|
41
41
|
"@napi-rs/wasm-runtime": "1.0.7",
|
|
42
42
|
"@rsbuild/plugin-node-polyfill": "^1.4.2",
|
|
43
|
-
"@rslib/core": "0.17.
|
|
43
|
+
"@rslib/core": "0.17.1",
|
|
44
44
|
"@swc/types": "0.1.25",
|
|
45
|
-
"@types/node": "^20.19.
|
|
45
|
+
"@types/node": "^20.19.25",
|
|
46
46
|
"@types/watchpack": "^2.4.4",
|
|
47
47
|
"browserslist-load-config": "^1.0.1",
|
|
48
48
|
"enhanced-resolve": "5.18.3",
|
|
49
49
|
"glob-to-regexp": "^0.4.1",
|
|
50
50
|
"memfs": "4.48.1",
|
|
51
|
-
"prebundle": "^1.
|
|
51
|
+
"prebundle": "^1.5.0",
|
|
52
52
|
"tinypool": "^1.1.1",
|
|
53
53
|
"tsx": "^4.20.6",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"webpack-sources": "3.3.3"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@module-federation/runtime-tools": "0.21.
|
|
59
|
+
"@module-federation/runtime-tools": "0.21.4",
|
|
60
60
|
"@rspack/lite-tapable": "1.0.1",
|
|
61
|
-
"@rspack/binding": "1.6.
|
|
61
|
+
"@rspack/binding": "1.6.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@swc/helpers": ">=0.5.1"
|