@rsbuild/core 1.4.11 → 1.4.13
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/css-loader/index.js +18 -18
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/launch-editor-middleware/index.js +32 -21
- package/compiled/launch-editor-middleware/package.json +1 -1
- package/compiled/postcss-load-config/index.js +10 -10
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rsbuild-dev-middleware/index.js +25 -25
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-chain/types/index.d.ts +11 -0
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/compiled/style-loader/index.js +10 -10
- package/dist/client/hmr.js +13 -2
- package/dist/client/overlay.js +3 -1
- package/dist/index.cjs +1322 -217
- package/dist/index.js +1304 -209
- package/dist/transformLoader.mjs +7 -5
- package/dist/transformRawLoader.mjs +7 -5
- package/dist-types/configChain.d.ts +1 -1
- package/dist-types/constants.d.ts +1 -0
- package/dist-types/helpers/index.d.ts +2 -2
- package/dist-types/helpers/stats.d.ts +1 -0
- package/dist-types/rspack-plugins/RsbuildHtmlPlugin.d.ts +1 -0
- package/dist-types/server/compilationMiddleware.d.ts +0 -4
- package/dist-types/server/devServer.d.ts +7 -2
- package/dist-types/server/historyApiFallback.d.ts +2 -0
- package/dist-types/server/socketServer.d.ts +24 -7
- package/dist-types/types/config.d.ts +20 -10
- package/dist-types/types/hooks.d.ts +1 -1
- package/dist-types/types/plugin.d.ts +1 -2
- package/package.json +9 -10
- package/compiled/connect-history-api-fallback/index.d.ts +0 -1
- package/compiled/connect-history-api-fallback/index.js +0 -149
- package/compiled/connect-history-api-fallback/license +0 -21
- package/compiled/connect-history-api-fallback/package.json +0 -1
- package/compiled/rspack-chain/index.js +0 -1769
|
@@ -1,1769 +0,0 @@
|
|
|
1
|
-
(() => {
|
|
2
|
-
var __webpack_modules__ = {
|
|
3
|
-
779: (module) => {
|
|
4
|
-
"use strict";
|
|
5
|
-
var isMergeableObject = function isMergeableObject(value) {
|
|
6
|
-
return isNonNullObject(value) && !isSpecial(value);
|
|
7
|
-
};
|
|
8
|
-
function isNonNullObject(value) {
|
|
9
|
-
return !!value && typeof value === "object";
|
|
10
|
-
}
|
|
11
|
-
function isSpecial(value) {
|
|
12
|
-
var stringValue = Object.prototype.toString.call(value);
|
|
13
|
-
return (
|
|
14
|
-
stringValue === "[object RegExp]" ||
|
|
15
|
-
stringValue === "[object Date]" ||
|
|
16
|
-
isReactElement(value)
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
var canUseSymbol = typeof Symbol === "function" && Symbol.for;
|
|
20
|
-
var REACT_ELEMENT_TYPE = canUseSymbol
|
|
21
|
-
? Symbol.for("react.element")
|
|
22
|
-
: 60103;
|
|
23
|
-
function isReactElement(value) {
|
|
24
|
-
return value.$$typeof === REACT_ELEMENT_TYPE;
|
|
25
|
-
}
|
|
26
|
-
function emptyTarget(val) {
|
|
27
|
-
return Array.isArray(val) ? [] : {};
|
|
28
|
-
}
|
|
29
|
-
function cloneUnlessOtherwiseSpecified(value, options) {
|
|
30
|
-
return options.clone !== false && options.isMergeableObject(value)
|
|
31
|
-
? deepmerge(emptyTarget(value), value, options)
|
|
32
|
-
: value;
|
|
33
|
-
}
|
|
34
|
-
function defaultArrayMerge(target, source, options) {
|
|
35
|
-
return target.concat(source).map(function (element) {
|
|
36
|
-
return cloneUnlessOtherwiseSpecified(element, options);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function getMergeFunction(key, options) {
|
|
40
|
-
if (!options.customMerge) {
|
|
41
|
-
return deepmerge;
|
|
42
|
-
}
|
|
43
|
-
var customMerge = options.customMerge(key);
|
|
44
|
-
return typeof customMerge === "function" ? customMerge : deepmerge;
|
|
45
|
-
}
|
|
46
|
-
function getEnumerableOwnPropertySymbols(target) {
|
|
47
|
-
return Object.getOwnPropertySymbols
|
|
48
|
-
? Object.getOwnPropertySymbols(target).filter(function (symbol) {
|
|
49
|
-
return Object.propertyIsEnumerable.call(target, symbol);
|
|
50
|
-
})
|
|
51
|
-
: [];
|
|
52
|
-
}
|
|
53
|
-
function getKeys(target) {
|
|
54
|
-
return Object.keys(target).concat(
|
|
55
|
-
getEnumerableOwnPropertySymbols(target),
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
function propertyIsOnObject(object, property) {
|
|
59
|
-
try {
|
|
60
|
-
return property in object;
|
|
61
|
-
} catch (_) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function propertyIsUnsafe(target, key) {
|
|
66
|
-
return (
|
|
67
|
-
propertyIsOnObject(target, key) &&
|
|
68
|
-
!(
|
|
69
|
-
Object.hasOwnProperty.call(target, key) &&
|
|
70
|
-
Object.propertyIsEnumerable.call(target, key)
|
|
71
|
-
)
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
function mergeObject(target, source, options) {
|
|
75
|
-
var destination = {};
|
|
76
|
-
if (options.isMergeableObject(target)) {
|
|
77
|
-
getKeys(target).forEach(function (key) {
|
|
78
|
-
destination[key] = cloneUnlessOtherwiseSpecified(
|
|
79
|
-
target[key],
|
|
80
|
-
options,
|
|
81
|
-
);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
getKeys(source).forEach(function (key) {
|
|
85
|
-
if (propertyIsUnsafe(target, key)) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (
|
|
89
|
-
propertyIsOnObject(target, key) &&
|
|
90
|
-
options.isMergeableObject(source[key])
|
|
91
|
-
) {
|
|
92
|
-
destination[key] = getMergeFunction(key, options)(
|
|
93
|
-
target[key],
|
|
94
|
-
source[key],
|
|
95
|
-
options,
|
|
96
|
-
);
|
|
97
|
-
} else {
|
|
98
|
-
destination[key] = cloneUnlessOtherwiseSpecified(
|
|
99
|
-
source[key],
|
|
100
|
-
options,
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
return destination;
|
|
105
|
-
}
|
|
106
|
-
function deepmerge(target, source, options) {
|
|
107
|
-
options = options || {};
|
|
108
|
-
options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
|
109
|
-
options.isMergeableObject =
|
|
110
|
-
options.isMergeableObject || isMergeableObject;
|
|
111
|
-
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
|
112
|
-
var sourceIsArray = Array.isArray(source);
|
|
113
|
-
var targetIsArray = Array.isArray(target);
|
|
114
|
-
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
|
115
|
-
if (!sourceAndTargetTypesMatch) {
|
|
116
|
-
return cloneUnlessOtherwiseSpecified(source, options);
|
|
117
|
-
} else if (sourceIsArray) {
|
|
118
|
-
return options.arrayMerge(target, source, options);
|
|
119
|
-
} else {
|
|
120
|
-
return mergeObject(target, source, options);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
deepmerge.all = function deepmergeAll(array, options) {
|
|
124
|
-
if (!Array.isArray(array)) {
|
|
125
|
-
throw new Error("first argument should be an array");
|
|
126
|
-
}
|
|
127
|
-
return array.reduce(function (prev, next) {
|
|
128
|
-
return deepmerge(prev, next, options);
|
|
129
|
-
}, {});
|
|
130
|
-
};
|
|
131
|
-
var deepmerge_1 = deepmerge;
|
|
132
|
-
module.exports = deepmerge_1;
|
|
133
|
-
},
|
|
134
|
-
257: (__unused_webpack_module, exports) => {
|
|
135
|
-
"use strict";
|
|
136
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
137
|
-
exports.arrayToString = void 0;
|
|
138
|
-
const arrayToString = (array, space, next) => {
|
|
139
|
-
const values = array
|
|
140
|
-
.map(function (value, index) {
|
|
141
|
-
const result = next(value, index);
|
|
142
|
-
if (result === undefined) return String(result);
|
|
143
|
-
return space + result.split("\n").join(`\n${space}`);
|
|
144
|
-
})
|
|
145
|
-
.join(space ? ",\n" : ",");
|
|
146
|
-
const eol = space && values ? "\n" : "";
|
|
147
|
-
return `[${eol}${values}${eol}]`;
|
|
148
|
-
};
|
|
149
|
-
exports.arrayToString = arrayToString;
|
|
150
|
-
},
|
|
151
|
-
210: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
152
|
-
"use strict";
|
|
153
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
154
|
-
exports.FunctionParser =
|
|
155
|
-
exports.dedentFunction =
|
|
156
|
-
exports.functionToString =
|
|
157
|
-
exports.USED_METHOD_KEY =
|
|
158
|
-
void 0;
|
|
159
|
-
const quote_1 = __nccwpck_require__(412);
|
|
160
|
-
const METHOD_NAMES_ARE_QUOTED =
|
|
161
|
-
{ " "() {} }[" "].toString().charAt(0) === '"';
|
|
162
|
-
const FUNCTION_PREFIXES = {
|
|
163
|
-
Function: "function ",
|
|
164
|
-
GeneratorFunction: "function* ",
|
|
165
|
-
AsyncFunction: "async function ",
|
|
166
|
-
AsyncGeneratorFunction: "async function* ",
|
|
167
|
-
};
|
|
168
|
-
const METHOD_PREFIXES = {
|
|
169
|
-
Function: "",
|
|
170
|
-
GeneratorFunction: "*",
|
|
171
|
-
AsyncFunction: "async ",
|
|
172
|
-
AsyncGeneratorFunction: "async *",
|
|
173
|
-
};
|
|
174
|
-
const TOKENS_PRECEDING_REGEXPS = new Set(
|
|
175
|
-
(
|
|
176
|
-
"case delete else in instanceof new return throw typeof void " +
|
|
177
|
-
", ; : + - ! ~ & | ^ * / % < > ? ="
|
|
178
|
-
).split(" "),
|
|
179
|
-
);
|
|
180
|
-
exports.USED_METHOD_KEY = new WeakSet();
|
|
181
|
-
const functionToString = (fn, space, next, key) => {
|
|
182
|
-
const name = typeof key === "string" ? key : undefined;
|
|
183
|
-
if (name !== undefined) exports.USED_METHOD_KEY.add(fn);
|
|
184
|
-
return new FunctionParser(fn, space, next, name).stringify();
|
|
185
|
-
};
|
|
186
|
-
exports.functionToString = functionToString;
|
|
187
|
-
function dedentFunction(fnString) {
|
|
188
|
-
let found;
|
|
189
|
-
for (const line of fnString.split("\n").slice(1)) {
|
|
190
|
-
const m = /^[\s\t]+/.exec(line);
|
|
191
|
-
if (!m) return fnString;
|
|
192
|
-
const [str] = m;
|
|
193
|
-
if (found === undefined) found = str;
|
|
194
|
-
else if (str.length < found.length) found = str;
|
|
195
|
-
}
|
|
196
|
-
return found ? fnString.split(`\n${found}`).join("\n") : fnString;
|
|
197
|
-
}
|
|
198
|
-
exports.dedentFunction = dedentFunction;
|
|
199
|
-
class FunctionParser {
|
|
200
|
-
constructor(fn, indent, next, key) {
|
|
201
|
-
this.fn = fn;
|
|
202
|
-
this.indent = indent;
|
|
203
|
-
this.next = next;
|
|
204
|
-
this.key = key;
|
|
205
|
-
this.pos = 0;
|
|
206
|
-
this.hadKeyword = false;
|
|
207
|
-
this.fnString = Function.prototype.toString.call(fn);
|
|
208
|
-
this.fnType = fn.constructor.name;
|
|
209
|
-
this.keyQuote = key === undefined ? "" : quote_1.quoteKey(key, next);
|
|
210
|
-
this.keyPrefix =
|
|
211
|
-
key === undefined ? "" : `${this.keyQuote}:${indent ? " " : ""}`;
|
|
212
|
-
this.isMethodCandidate =
|
|
213
|
-
key === undefined
|
|
214
|
-
? false
|
|
215
|
-
: this.fn.name === "" || this.fn.name === key;
|
|
216
|
-
}
|
|
217
|
-
stringify() {
|
|
218
|
-
const value = this.tryParse();
|
|
219
|
-
if (!value) {
|
|
220
|
-
return `${this.keyPrefix}void ${this.next(this.fnString)}`;
|
|
221
|
-
}
|
|
222
|
-
return dedentFunction(value);
|
|
223
|
-
}
|
|
224
|
-
getPrefix() {
|
|
225
|
-
if (this.isMethodCandidate && !this.hadKeyword) {
|
|
226
|
-
return METHOD_PREFIXES[this.fnType] + this.keyQuote;
|
|
227
|
-
}
|
|
228
|
-
return this.keyPrefix + FUNCTION_PREFIXES[this.fnType];
|
|
229
|
-
}
|
|
230
|
-
tryParse() {
|
|
231
|
-
if (this.fnString[this.fnString.length - 1] !== "}") {
|
|
232
|
-
return this.keyPrefix + this.fnString;
|
|
233
|
-
}
|
|
234
|
-
if (this.fn.name) {
|
|
235
|
-
const result = this.tryStrippingName();
|
|
236
|
-
if (result) return result;
|
|
237
|
-
}
|
|
238
|
-
const prevPos = this.pos;
|
|
239
|
-
if (this.consumeSyntax() === "class") return this.fnString;
|
|
240
|
-
this.pos = prevPos;
|
|
241
|
-
if (this.tryParsePrefixTokens()) {
|
|
242
|
-
const result = this.tryStrippingName();
|
|
243
|
-
if (result) return result;
|
|
244
|
-
let offset = this.pos;
|
|
245
|
-
switch (this.consumeSyntax("WORD_LIKE")) {
|
|
246
|
-
case "WORD_LIKE":
|
|
247
|
-
if (this.isMethodCandidate && !this.hadKeyword) {
|
|
248
|
-
offset = this.pos;
|
|
249
|
-
}
|
|
250
|
-
case "()":
|
|
251
|
-
if (this.fnString.substr(this.pos, 2) === "=>") {
|
|
252
|
-
return this.keyPrefix + this.fnString;
|
|
253
|
-
}
|
|
254
|
-
this.pos = offset;
|
|
255
|
-
case '"':
|
|
256
|
-
case "'":
|
|
257
|
-
case "[]":
|
|
258
|
-
return this.getPrefix() + this.fnString.substr(this.pos);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
tryStrippingName() {
|
|
263
|
-
if (METHOD_NAMES_ARE_QUOTED) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
let start = this.pos;
|
|
267
|
-
const prefix = this.fnString.substr(this.pos, this.fn.name.length);
|
|
268
|
-
if (prefix === this.fn.name) {
|
|
269
|
-
this.pos += prefix.length;
|
|
270
|
-
if (
|
|
271
|
-
this.consumeSyntax() === "()" &&
|
|
272
|
-
this.consumeSyntax() === "{}" &&
|
|
273
|
-
this.pos === this.fnString.length
|
|
274
|
-
) {
|
|
275
|
-
if (
|
|
276
|
-
this.isMethodCandidate ||
|
|
277
|
-
!quote_1.isValidVariableName(prefix)
|
|
278
|
-
) {
|
|
279
|
-
start += prefix.length;
|
|
280
|
-
}
|
|
281
|
-
return this.getPrefix() + this.fnString.substr(start);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
this.pos = start;
|
|
285
|
-
}
|
|
286
|
-
tryParsePrefixTokens() {
|
|
287
|
-
let posPrev = this.pos;
|
|
288
|
-
this.hadKeyword = false;
|
|
289
|
-
switch (this.fnType) {
|
|
290
|
-
case "AsyncFunction":
|
|
291
|
-
if (this.consumeSyntax() !== "async") return false;
|
|
292
|
-
posPrev = this.pos;
|
|
293
|
-
case "Function":
|
|
294
|
-
if (this.consumeSyntax() === "function") {
|
|
295
|
-
this.hadKeyword = true;
|
|
296
|
-
} else {
|
|
297
|
-
this.pos = posPrev;
|
|
298
|
-
}
|
|
299
|
-
return true;
|
|
300
|
-
case "AsyncGeneratorFunction":
|
|
301
|
-
if (this.consumeSyntax() !== "async") return false;
|
|
302
|
-
case "GeneratorFunction":
|
|
303
|
-
let token = this.consumeSyntax();
|
|
304
|
-
if (token === "function") {
|
|
305
|
-
token = this.consumeSyntax();
|
|
306
|
-
this.hadKeyword = true;
|
|
307
|
-
}
|
|
308
|
-
return token === "*";
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
consumeSyntax(wordLikeToken) {
|
|
312
|
-
const m = this.consumeMatch(
|
|
313
|
-
/^(?:([A-Za-z_0-9$\xA0-\uFFFF]+)|=>|\+\+|\-\-|.)/,
|
|
314
|
-
);
|
|
315
|
-
if (!m) return;
|
|
316
|
-
const [token, match] = m;
|
|
317
|
-
this.consumeWhitespace();
|
|
318
|
-
if (match) return wordLikeToken || match;
|
|
319
|
-
switch (token) {
|
|
320
|
-
case "(":
|
|
321
|
-
return this.consumeSyntaxUntil("(", ")");
|
|
322
|
-
case "[":
|
|
323
|
-
return this.consumeSyntaxUntil("[", "]");
|
|
324
|
-
case "{":
|
|
325
|
-
return this.consumeSyntaxUntil("{", "}");
|
|
326
|
-
case "`":
|
|
327
|
-
return this.consumeTemplate();
|
|
328
|
-
case '"':
|
|
329
|
-
return this.consumeRegExp(/^(?:[^\\"]|\\.)*"/, '"');
|
|
330
|
-
case "'":
|
|
331
|
-
return this.consumeRegExp(/^(?:[^\\']|\\.)*'/, "'");
|
|
332
|
-
}
|
|
333
|
-
return token;
|
|
334
|
-
}
|
|
335
|
-
consumeSyntaxUntil(startToken, endToken) {
|
|
336
|
-
let isRegExpAllowed = true;
|
|
337
|
-
for (;;) {
|
|
338
|
-
const token = this.consumeSyntax();
|
|
339
|
-
if (token === endToken) return startToken + endToken;
|
|
340
|
-
if (!token || token === ")" || token === "]" || token === "}")
|
|
341
|
-
return;
|
|
342
|
-
if (
|
|
343
|
-
token === "/" &&
|
|
344
|
-
isRegExpAllowed &&
|
|
345
|
-
this.consumeMatch(
|
|
346
|
-
/^(?:\\.|[^\\\/\n[]|\[(?:\\.|[^\]])*\])+\/[a-z]*/,
|
|
347
|
-
)
|
|
348
|
-
) {
|
|
349
|
-
isRegExpAllowed = false;
|
|
350
|
-
this.consumeWhitespace();
|
|
351
|
-
} else {
|
|
352
|
-
isRegExpAllowed = TOKENS_PRECEDING_REGEXPS.has(token);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
consumeMatch(re) {
|
|
357
|
-
const m = re.exec(this.fnString.substr(this.pos));
|
|
358
|
-
if (m) this.pos += m[0].length;
|
|
359
|
-
return m;
|
|
360
|
-
}
|
|
361
|
-
consumeRegExp(re, token) {
|
|
362
|
-
const m = re.exec(this.fnString.substr(this.pos));
|
|
363
|
-
if (!m) return;
|
|
364
|
-
this.pos += m[0].length;
|
|
365
|
-
this.consumeWhitespace();
|
|
366
|
-
return token;
|
|
367
|
-
}
|
|
368
|
-
consumeTemplate() {
|
|
369
|
-
for (;;) {
|
|
370
|
-
this.consumeMatch(/^(?:[^`$\\]|\\.|\$(?!{))*/);
|
|
371
|
-
if (this.fnString[this.pos] === "`") {
|
|
372
|
-
this.pos++;
|
|
373
|
-
this.consumeWhitespace();
|
|
374
|
-
return "`";
|
|
375
|
-
}
|
|
376
|
-
if (this.fnString.substr(this.pos, 2) === "${") {
|
|
377
|
-
this.pos += 2;
|
|
378
|
-
this.consumeWhitespace();
|
|
379
|
-
if (this.consumeSyntaxUntil("{", "}")) continue;
|
|
380
|
-
}
|
|
381
|
-
return;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
consumeWhitespace() {
|
|
385
|
-
this.consumeMatch(/^(?:\s|\/\/.*|\/\*[^]*?\*\/)*/);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
exports.FunctionParser = FunctionParser;
|
|
389
|
-
},
|
|
390
|
-
824: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
391
|
-
"use strict";
|
|
392
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
393
|
-
exports.stringify = void 0;
|
|
394
|
-
const stringify_1 = __nccwpck_require__(421);
|
|
395
|
-
const quote_1 = __nccwpck_require__(412);
|
|
396
|
-
const ROOT_SENTINEL = Symbol("root");
|
|
397
|
-
function stringify(value, replacer, indent, options = {}) {
|
|
398
|
-
const space =
|
|
399
|
-
typeof indent === "string" ? indent : " ".repeat(indent || 0);
|
|
400
|
-
const path = [];
|
|
401
|
-
const stack = new Set();
|
|
402
|
-
const tracking = new Map();
|
|
403
|
-
const unpack = new Map();
|
|
404
|
-
let valueCount = 0;
|
|
405
|
-
const {
|
|
406
|
-
maxDepth = 100,
|
|
407
|
-
references = false,
|
|
408
|
-
skipUndefinedProperties = false,
|
|
409
|
-
maxValues = 1e5,
|
|
410
|
-
} = options;
|
|
411
|
-
const valueToString = replacerToString(replacer);
|
|
412
|
-
const onNext = (value, key) => {
|
|
413
|
-
if (++valueCount > maxValues) return;
|
|
414
|
-
if (skipUndefinedProperties && value === undefined) return;
|
|
415
|
-
if (path.length > maxDepth) return;
|
|
416
|
-
if (key === undefined)
|
|
417
|
-
return valueToString(value, space, onNext, key);
|
|
418
|
-
path.push(key);
|
|
419
|
-
const result = builder(
|
|
420
|
-
value,
|
|
421
|
-
key === ROOT_SENTINEL ? undefined : key,
|
|
422
|
-
);
|
|
423
|
-
path.pop();
|
|
424
|
-
return result;
|
|
425
|
-
};
|
|
426
|
-
const builder = references
|
|
427
|
-
? (value, key) => {
|
|
428
|
-
if (
|
|
429
|
-
value !== null &&
|
|
430
|
-
(typeof value === "object" ||
|
|
431
|
-
typeof value === "function" ||
|
|
432
|
-
typeof value === "symbol")
|
|
433
|
-
) {
|
|
434
|
-
if (tracking.has(value)) {
|
|
435
|
-
unpack.set(path.slice(1), tracking.get(value));
|
|
436
|
-
return valueToString(undefined, space, onNext, key);
|
|
437
|
-
}
|
|
438
|
-
tracking.set(value, path.slice(1));
|
|
439
|
-
}
|
|
440
|
-
return valueToString(value, space, onNext, key);
|
|
441
|
-
}
|
|
442
|
-
: (value, key) => {
|
|
443
|
-
if (stack.has(value)) return;
|
|
444
|
-
stack.add(value);
|
|
445
|
-
const result = valueToString(value, space, onNext, key);
|
|
446
|
-
stack.delete(value);
|
|
447
|
-
return result;
|
|
448
|
-
};
|
|
449
|
-
const result = onNext(value, ROOT_SENTINEL);
|
|
450
|
-
if (unpack.size) {
|
|
451
|
-
const sp = space ? " " : "";
|
|
452
|
-
const eol = space ? "\n" : "";
|
|
453
|
-
let wrapper = `var x${sp}=${sp}${result};${eol}`;
|
|
454
|
-
for (const [key, value] of unpack.entries()) {
|
|
455
|
-
const keyPath = quote_1.stringifyPath(key, onNext);
|
|
456
|
-
const valuePath = quote_1.stringifyPath(value, onNext);
|
|
457
|
-
wrapper += `x${keyPath}${sp}=${sp}x${valuePath};${eol}`;
|
|
458
|
-
}
|
|
459
|
-
return `(function${sp}()${sp}{${eol}${wrapper}return x;${eol}}())`;
|
|
460
|
-
}
|
|
461
|
-
return result;
|
|
462
|
-
}
|
|
463
|
-
exports.stringify = stringify;
|
|
464
|
-
function replacerToString(replacer) {
|
|
465
|
-
if (!replacer) return stringify_1.toString;
|
|
466
|
-
return (value, space, next, key) =>
|
|
467
|
-
replacer(
|
|
468
|
-
value,
|
|
469
|
-
space,
|
|
470
|
-
(value) => stringify_1.toString(value, space, next, key),
|
|
471
|
-
key,
|
|
472
|
-
);
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
973: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
476
|
-
"use strict";
|
|
477
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
478
|
-
exports.objectToString = void 0;
|
|
479
|
-
const quote_1 = __nccwpck_require__(412);
|
|
480
|
-
const function_1 = __nccwpck_require__(210);
|
|
481
|
-
const array_1 = __nccwpck_require__(257);
|
|
482
|
-
const objectToString = (value, space, next, key) => {
|
|
483
|
-
if (typeof Buffer === "function" && Buffer.isBuffer(value)) {
|
|
484
|
-
return `Buffer.from(${next(value.toString("base64"))}, 'base64')`;
|
|
485
|
-
}
|
|
486
|
-
if (typeof global === "object" && value === global) {
|
|
487
|
-
return globalToString(value, space, next, key);
|
|
488
|
-
}
|
|
489
|
-
const toString = OBJECT_TYPES[Object.prototype.toString.call(value)];
|
|
490
|
-
return toString ? toString(value, space, next, key) : undefined;
|
|
491
|
-
};
|
|
492
|
-
exports.objectToString = objectToString;
|
|
493
|
-
const rawObjectToString = (obj, indent, next, key) => {
|
|
494
|
-
const eol = indent ? "\n" : "";
|
|
495
|
-
const space = indent ? " " : "";
|
|
496
|
-
const values = Object.keys(obj)
|
|
497
|
-
.reduce(function (values, key) {
|
|
498
|
-
const fn = obj[key];
|
|
499
|
-
const result = next(fn, key);
|
|
500
|
-
if (result === undefined) return values;
|
|
501
|
-
const value = result.split("\n").join(`\n${indent}`);
|
|
502
|
-
if (function_1.USED_METHOD_KEY.has(fn)) {
|
|
503
|
-
values.push(`${indent}${value}`);
|
|
504
|
-
return values;
|
|
505
|
-
}
|
|
506
|
-
values.push(
|
|
507
|
-
`${indent}${quote_1.quoteKey(key, next)}:${space}${value}`,
|
|
508
|
-
);
|
|
509
|
-
return values;
|
|
510
|
-
}, [])
|
|
511
|
-
.join(`,${eol}`);
|
|
512
|
-
if (values === "") return "{}";
|
|
513
|
-
return `{${eol}${values}${eol}}`;
|
|
514
|
-
};
|
|
515
|
-
const globalToString = (value, space, next) =>
|
|
516
|
-
`Function(${next("return this")})()`;
|
|
517
|
-
const OBJECT_TYPES = {
|
|
518
|
-
"[object Array]": array_1.arrayToString,
|
|
519
|
-
"[object Object]": rawObjectToString,
|
|
520
|
-
"[object Error]": (error, space, next) =>
|
|
521
|
-
`new Error(${next(error.message)})`,
|
|
522
|
-
"[object Date]": (date) => `new Date(${date.getTime()})`,
|
|
523
|
-
"[object String]": (str, space, next) =>
|
|
524
|
-
`new String(${next(str.toString())})`,
|
|
525
|
-
"[object Number]": (num) => `new Number(${num})`,
|
|
526
|
-
"[object Boolean]": (bool) => `new Boolean(${bool})`,
|
|
527
|
-
"[object Set]": (set, space, next) =>
|
|
528
|
-
`new Set(${next(Array.from(set))})`,
|
|
529
|
-
"[object Map]": (map, space, next) =>
|
|
530
|
-
`new Map(${next(Array.from(map))})`,
|
|
531
|
-
"[object RegExp]": String,
|
|
532
|
-
"[object global]": globalToString,
|
|
533
|
-
"[object Window]": globalToString,
|
|
534
|
-
};
|
|
535
|
-
},
|
|
536
|
-
412: (__unused_webpack_module, exports) => {
|
|
537
|
-
"use strict";
|
|
538
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
539
|
-
exports.stringifyPath =
|
|
540
|
-
exports.quoteKey =
|
|
541
|
-
exports.isValidVariableName =
|
|
542
|
-
exports.IS_VALID_IDENTIFIER =
|
|
543
|
-
exports.quoteString =
|
|
544
|
-
void 0;
|
|
545
|
-
const ESCAPABLE =
|
|
546
|
-
/[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
|
547
|
-
const META_CHARS = new Map([
|
|
548
|
-
["\b", "\\b"],
|
|
549
|
-
["\t", "\\t"],
|
|
550
|
-
["\n", "\\n"],
|
|
551
|
-
["\f", "\\f"],
|
|
552
|
-
["\r", "\\r"],
|
|
553
|
-
["'", "\\'"],
|
|
554
|
-
['"', '\\"'],
|
|
555
|
-
["\\", "\\\\"],
|
|
556
|
-
]);
|
|
557
|
-
function escapeChar(char) {
|
|
558
|
-
return (
|
|
559
|
-
META_CHARS.get(char) ||
|
|
560
|
-
`\\u${`0000${char.charCodeAt(0).toString(16)}`.slice(-4)}`
|
|
561
|
-
);
|
|
562
|
-
}
|
|
563
|
-
function quoteString(str) {
|
|
564
|
-
return `'${str.replace(ESCAPABLE, escapeChar)}'`;
|
|
565
|
-
}
|
|
566
|
-
exports.quoteString = quoteString;
|
|
567
|
-
const RESERVED_WORDS = new Set(
|
|
568
|
-
(
|
|
569
|
-
"break else new var case finally return void catch for switch while " +
|
|
570
|
-
"continue function this with default if throw delete in try " +
|
|
571
|
-
"do instanceof typeof abstract enum int short boolean export " +
|
|
572
|
-
"interface static byte extends long super char final native synchronized " +
|
|
573
|
-
"class float package throws const goto private transient debugger " +
|
|
574
|
-
"implements protected volatile double import public let yield"
|
|
575
|
-
).split(" "),
|
|
576
|
-
);
|
|
577
|
-
exports.IS_VALID_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
578
|
-
function isValidVariableName(name) {
|
|
579
|
-
return (
|
|
580
|
-
typeof name === "string" &&
|
|
581
|
-
!RESERVED_WORDS.has(name) &&
|
|
582
|
-
exports.IS_VALID_IDENTIFIER.test(name)
|
|
583
|
-
);
|
|
584
|
-
}
|
|
585
|
-
exports.isValidVariableName = isValidVariableName;
|
|
586
|
-
function quoteKey(key, next) {
|
|
587
|
-
return isValidVariableName(key) ? key : next(key);
|
|
588
|
-
}
|
|
589
|
-
exports.quoteKey = quoteKey;
|
|
590
|
-
function stringifyPath(path, next) {
|
|
591
|
-
let result = "";
|
|
592
|
-
for (const key of path) {
|
|
593
|
-
if (isValidVariableName(key)) {
|
|
594
|
-
result += `.${key}`;
|
|
595
|
-
} else {
|
|
596
|
-
result += `[${next(key)}]`;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
return result;
|
|
600
|
-
}
|
|
601
|
-
exports.stringifyPath = stringifyPath;
|
|
602
|
-
},
|
|
603
|
-
421: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
604
|
-
"use strict";
|
|
605
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
606
|
-
exports.toString = void 0;
|
|
607
|
-
const quote_1 = __nccwpck_require__(412);
|
|
608
|
-
const object_1 = __nccwpck_require__(973);
|
|
609
|
-
const function_1 = __nccwpck_require__(210);
|
|
610
|
-
const PRIMITIVE_TYPES = {
|
|
611
|
-
string: quote_1.quoteString,
|
|
612
|
-
number: (value) => (Object.is(value, -0) ? "-0" : String(value)),
|
|
613
|
-
boolean: String,
|
|
614
|
-
symbol: (value, space, next) => {
|
|
615
|
-
const key = Symbol.keyFor(value);
|
|
616
|
-
if (key !== undefined) return `Symbol.for(${next(key)})`;
|
|
617
|
-
return `Symbol(${next(value.description)})`;
|
|
618
|
-
},
|
|
619
|
-
bigint: (value, space, next) => `BigInt(${next(String(value))})`,
|
|
620
|
-
undefined: String,
|
|
621
|
-
object: object_1.objectToString,
|
|
622
|
-
function: function_1.functionToString,
|
|
623
|
-
};
|
|
624
|
-
const toString = (value, space, next, key) => {
|
|
625
|
-
if (value === null) return "null";
|
|
626
|
-
return PRIMITIVE_TYPES[typeof value](value, space, next, key);
|
|
627
|
-
};
|
|
628
|
-
exports.toString = toString;
|
|
629
|
-
},
|
|
630
|
-
438: (module) => {
|
|
631
|
-
module.exports = class extends Function {
|
|
632
|
-
constructor() {
|
|
633
|
-
super();
|
|
634
|
-
return new Proxy(this, {
|
|
635
|
-
apply: (target, thisArg, args) => target.classCall(...args),
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
classCall() {
|
|
639
|
-
throw new Error("not implemented");
|
|
640
|
-
}
|
|
641
|
-
};
|
|
642
|
-
},
|
|
643
|
-
560: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
644
|
-
const createMap = __nccwpck_require__(777);
|
|
645
|
-
const createChainable = __nccwpck_require__(626);
|
|
646
|
-
module.exports = createMap(createChainable(Object));
|
|
647
|
-
},
|
|
648
|
-
338: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
649
|
-
const createSet = __nccwpck_require__(551);
|
|
650
|
-
const createChainable = __nccwpck_require__(626);
|
|
651
|
-
module.exports = createSet(createChainable(Object));
|
|
652
|
-
},
|
|
653
|
-
793: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
654
|
-
const Callable = __nccwpck_require__(438);
|
|
655
|
-
const createMap = __nccwpck_require__(777);
|
|
656
|
-
const createChainable = __nccwpck_require__(626);
|
|
657
|
-
const createValue = __nccwpck_require__(322);
|
|
658
|
-
module.exports = createValue(createMap(createChainable(Callable)));
|
|
659
|
-
},
|
|
660
|
-
0: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
661
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
662
|
-
const ChainedValueMap = __nccwpck_require__(793);
|
|
663
|
-
const ChainedSet = __nccwpck_require__(338);
|
|
664
|
-
const Resolve = __nccwpck_require__(212);
|
|
665
|
-
const ResolveLoader = __nccwpck_require__(387);
|
|
666
|
-
const Output = __nccwpck_require__(639);
|
|
667
|
-
const DevServer = __nccwpck_require__(808);
|
|
668
|
-
const Plugin = __nccwpck_require__(169);
|
|
669
|
-
const Module = __nccwpck_require__(402);
|
|
670
|
-
const Optimization = __nccwpck_require__(247);
|
|
671
|
-
const Performance = __nccwpck_require__(698);
|
|
672
|
-
const castArray = (value) => (Array.isArray(value) ? value : [value]);
|
|
673
|
-
const toEntryObject = (entryPoints) => {
|
|
674
|
-
const entry = Object.keys(entryPoints).reduce(
|
|
675
|
-
(acc, key) =>
|
|
676
|
-
Object.assign(acc, { [key]: entryPoints[key].values() }),
|
|
677
|
-
{},
|
|
678
|
-
);
|
|
679
|
-
const formattedEntry = {};
|
|
680
|
-
for (const [entryName, entryValue] of Object.entries(entry)) {
|
|
681
|
-
const entryImport = [];
|
|
682
|
-
let entryDescription = null;
|
|
683
|
-
for (const item of castArray(entryValue)) {
|
|
684
|
-
if (typeof item === "string") {
|
|
685
|
-
entryImport.push(item);
|
|
686
|
-
continue;
|
|
687
|
-
}
|
|
688
|
-
if (item.import) {
|
|
689
|
-
entryImport.push(...castArray(item.import));
|
|
690
|
-
}
|
|
691
|
-
if (entryDescription) {
|
|
692
|
-
Object.assign(entryDescription, item);
|
|
693
|
-
} else {
|
|
694
|
-
entryDescription = item;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
formattedEntry[entryName] = entryDescription
|
|
698
|
-
? { ...entryDescription, import: entryImport }
|
|
699
|
-
: entryImport;
|
|
700
|
-
}
|
|
701
|
-
return formattedEntry;
|
|
702
|
-
};
|
|
703
|
-
module.exports = class extends ChainedMap {
|
|
704
|
-
constructor() {
|
|
705
|
-
super();
|
|
706
|
-
this.entryPoints = new ChainedMap(this);
|
|
707
|
-
this.output = new Output(this);
|
|
708
|
-
this.module = new Module(this);
|
|
709
|
-
this.resolve = new Resolve(this);
|
|
710
|
-
this.resolveLoader = new ResolveLoader(this);
|
|
711
|
-
this.optimization = new Optimization(this);
|
|
712
|
-
this.plugins = new ChainedMap(this);
|
|
713
|
-
this.devServer = new DevServer(this);
|
|
714
|
-
this.performance = new Performance(this);
|
|
715
|
-
this.node = new ChainedValueMap(this);
|
|
716
|
-
this.extend([
|
|
717
|
-
"context",
|
|
718
|
-
"mode",
|
|
719
|
-
"devtool",
|
|
720
|
-
"target",
|
|
721
|
-
"watch",
|
|
722
|
-
"watchOptions",
|
|
723
|
-
"externals",
|
|
724
|
-
"externalsType",
|
|
725
|
-
"externalsPresets",
|
|
726
|
-
"stats",
|
|
727
|
-
"experiments",
|
|
728
|
-
"amd",
|
|
729
|
-
"bail",
|
|
730
|
-
"cache",
|
|
731
|
-
"dependencies",
|
|
732
|
-
"ignoreWarnings",
|
|
733
|
-
"loader",
|
|
734
|
-
"parallelism",
|
|
735
|
-
"profile",
|
|
736
|
-
"recordsPath",
|
|
737
|
-
"recordsInputPath",
|
|
738
|
-
"recordsOutputPath",
|
|
739
|
-
"name",
|
|
740
|
-
"infrastructureLogging",
|
|
741
|
-
"snapshot",
|
|
742
|
-
]);
|
|
743
|
-
}
|
|
744
|
-
static toString(
|
|
745
|
-
config,
|
|
746
|
-
{ verbose = false, configPrefix = "config" } = {},
|
|
747
|
-
) {
|
|
748
|
-
const { stringify } = __nccwpck_require__(824);
|
|
749
|
-
return stringify(
|
|
750
|
-
config,
|
|
751
|
-
(value, indent, stringify) => {
|
|
752
|
-
if (value && value.__pluginName) {
|
|
753
|
-
const prefix = `/* ${configPrefix}.${value.__pluginType}('${value.__pluginName}') */\n`;
|
|
754
|
-
const constructorExpression = value.__pluginPath
|
|
755
|
-
? `(require(${stringify(value.__pluginPath)}))`
|
|
756
|
-
: value.__pluginConstructorName;
|
|
757
|
-
if (constructorExpression) {
|
|
758
|
-
const args = stringify(value.__pluginArgs).slice(1, -1);
|
|
759
|
-
return `${prefix}new ${constructorExpression}(${args})`;
|
|
760
|
-
}
|
|
761
|
-
return (
|
|
762
|
-
prefix +
|
|
763
|
-
stringify(
|
|
764
|
-
value.__pluginArgs && value.__pluginArgs.length
|
|
765
|
-
? { args: value.__pluginArgs }
|
|
766
|
-
: {},
|
|
767
|
-
)
|
|
768
|
-
);
|
|
769
|
-
}
|
|
770
|
-
if (value && value.__ruleNames) {
|
|
771
|
-
const ruleTypes = value.__ruleTypes;
|
|
772
|
-
const prefix = `/* ${configPrefix}.module${value.__ruleNames.map((r, index) => `.${ruleTypes ? ruleTypes[index] : "rule"}('${r}')`).join("")}${value.__useName ? `.use('${value.__useName}')` : ``} */\n`;
|
|
773
|
-
return prefix + stringify(value);
|
|
774
|
-
}
|
|
775
|
-
if (value && value.__expression) {
|
|
776
|
-
return value.__expression;
|
|
777
|
-
}
|
|
778
|
-
if (typeof value === "function") {
|
|
779
|
-
if (!verbose && value.toString().length > 100) {
|
|
780
|
-
return `function () { /* omitted long function */ }`;
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
return stringify(value);
|
|
784
|
-
},
|
|
785
|
-
2,
|
|
786
|
-
);
|
|
787
|
-
}
|
|
788
|
-
entry(name) {
|
|
789
|
-
return this.entryPoints.getOrCompute(
|
|
790
|
-
name,
|
|
791
|
-
() => new ChainedSet(this),
|
|
792
|
-
);
|
|
793
|
-
}
|
|
794
|
-
plugin(name) {
|
|
795
|
-
return this.plugins.getOrCompute(name, () => new Plugin(this, name));
|
|
796
|
-
}
|
|
797
|
-
toConfig() {
|
|
798
|
-
const entryPoints = this.entryPoints.entries() || {};
|
|
799
|
-
const baseConfig = this.entries() || {};
|
|
800
|
-
return this.clean(
|
|
801
|
-
Object.assign(baseConfig, {
|
|
802
|
-
node: this.node.entries(),
|
|
803
|
-
output: this.output.entries(),
|
|
804
|
-
resolve: this.resolve.toConfig(),
|
|
805
|
-
resolveLoader: this.resolveLoader.toConfig(),
|
|
806
|
-
devServer: this.devServer.toConfig(),
|
|
807
|
-
module: this.module.toConfig(),
|
|
808
|
-
optimization: this.optimization.toConfig(),
|
|
809
|
-
plugins: this.plugins.values().map((plugin) => plugin.toConfig()),
|
|
810
|
-
performance: this.performance.entries(),
|
|
811
|
-
entry: toEntryObject(entryPoints),
|
|
812
|
-
}),
|
|
813
|
-
);
|
|
814
|
-
}
|
|
815
|
-
toString(options) {
|
|
816
|
-
return module.exports.toString(this.toConfig(), options);
|
|
817
|
-
}
|
|
818
|
-
merge(obj = {}, omit = []) {
|
|
819
|
-
const omissions = [
|
|
820
|
-
"node",
|
|
821
|
-
"output",
|
|
822
|
-
"resolve",
|
|
823
|
-
"resolveLoader",
|
|
824
|
-
"devServer",
|
|
825
|
-
"optimization",
|
|
826
|
-
"performance",
|
|
827
|
-
"module",
|
|
828
|
-
];
|
|
829
|
-
if (!omit.includes("entry") && "entry" in obj) {
|
|
830
|
-
Object.keys(obj.entry).forEach((name) =>
|
|
831
|
-
this.entry(name).merge([].concat(obj.entry[name])),
|
|
832
|
-
);
|
|
833
|
-
}
|
|
834
|
-
if (!omit.includes("plugin") && "plugin" in obj) {
|
|
835
|
-
Object.keys(obj.plugin).forEach((name) =>
|
|
836
|
-
this.plugin(name).merge(obj.plugin[name]),
|
|
837
|
-
);
|
|
838
|
-
}
|
|
839
|
-
omissions.forEach((key) => {
|
|
840
|
-
if (!omit.includes(key) && key in obj) {
|
|
841
|
-
this[key].merge(obj[key]);
|
|
842
|
-
}
|
|
843
|
-
});
|
|
844
|
-
return super.merge(obj, [...omit, ...omissions, "entry", "plugin"]);
|
|
845
|
-
}
|
|
846
|
-
};
|
|
847
|
-
},
|
|
848
|
-
808: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
849
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
850
|
-
const ChainedSet = __nccwpck_require__(338);
|
|
851
|
-
module.exports = class extends ChainedMap {
|
|
852
|
-
constructor(parent) {
|
|
853
|
-
super(parent);
|
|
854
|
-
this.allowedHosts = new ChainedSet(this);
|
|
855
|
-
this.extend([
|
|
856
|
-
"after",
|
|
857
|
-
"before",
|
|
858
|
-
"bonjour",
|
|
859
|
-
"clientLogLevel",
|
|
860
|
-
"compress",
|
|
861
|
-
"contentBase",
|
|
862
|
-
"contentBasePublicPath",
|
|
863
|
-
"disableHostCheck",
|
|
864
|
-
"filename",
|
|
865
|
-
"headers",
|
|
866
|
-
"historyApiFallback",
|
|
867
|
-
"host",
|
|
868
|
-
"hot",
|
|
869
|
-
"hotOnly",
|
|
870
|
-
"http2",
|
|
871
|
-
"https",
|
|
872
|
-
"index",
|
|
873
|
-
"injectClient",
|
|
874
|
-
"injectHot",
|
|
875
|
-
"inline",
|
|
876
|
-
"lazy",
|
|
877
|
-
"liveReload",
|
|
878
|
-
"mimeTypes",
|
|
879
|
-
"noInfo",
|
|
880
|
-
"onListening",
|
|
881
|
-
"open",
|
|
882
|
-
"openPage",
|
|
883
|
-
"overlay",
|
|
884
|
-
"pfx",
|
|
885
|
-
"pfxPassphrase",
|
|
886
|
-
"port",
|
|
887
|
-
"proxy",
|
|
888
|
-
"progress",
|
|
889
|
-
"public",
|
|
890
|
-
"publicPath",
|
|
891
|
-
"quiet",
|
|
892
|
-
"serveIndex",
|
|
893
|
-
"setup",
|
|
894
|
-
"socket",
|
|
895
|
-
"sockHost",
|
|
896
|
-
"sockPath",
|
|
897
|
-
"sockPort",
|
|
898
|
-
"staticOptions",
|
|
899
|
-
"stats",
|
|
900
|
-
"stdin",
|
|
901
|
-
"transportMode",
|
|
902
|
-
"useLocalIp",
|
|
903
|
-
"watchContentBase",
|
|
904
|
-
"watchOptions",
|
|
905
|
-
"writeToDisk",
|
|
906
|
-
]);
|
|
907
|
-
}
|
|
908
|
-
toConfig() {
|
|
909
|
-
return this.clean({
|
|
910
|
-
allowedHosts: this.allowedHosts.values(),
|
|
911
|
-
...(this.entries() || {}),
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
merge(obj, omit = []) {
|
|
915
|
-
if (!omit.includes("allowedHosts") && "allowedHosts" in obj) {
|
|
916
|
-
this.allowedHosts.merge(obj.allowedHosts);
|
|
917
|
-
}
|
|
918
|
-
return super.merge(obj, ["allowedHosts"]);
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
},
|
|
922
|
-
402: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
923
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
924
|
-
const Rule = __nccwpck_require__(524);
|
|
925
|
-
module.exports = class extends ChainedMap {
|
|
926
|
-
constructor(parent) {
|
|
927
|
-
super(parent);
|
|
928
|
-
this.rules = new ChainedMap(this);
|
|
929
|
-
this.defaultRules = new ChainedMap(this);
|
|
930
|
-
this.generator = new ChainedMap(this);
|
|
931
|
-
this.parser = new ChainedMap(this);
|
|
932
|
-
this.extend([
|
|
933
|
-
"noParse",
|
|
934
|
-
"unsafeCache",
|
|
935
|
-
"wrappedContextCritical",
|
|
936
|
-
"exprContextRegExp",
|
|
937
|
-
"wrappedContextRecursive",
|
|
938
|
-
"strictExportPresence",
|
|
939
|
-
"wrappedContextRegExp",
|
|
940
|
-
]);
|
|
941
|
-
}
|
|
942
|
-
defaultRule(name) {
|
|
943
|
-
return this.defaultRules.getOrCompute(
|
|
944
|
-
name,
|
|
945
|
-
() => new Rule(this, name, "defaultRule"),
|
|
946
|
-
);
|
|
947
|
-
}
|
|
948
|
-
rule(name) {
|
|
949
|
-
return this.rules.getOrCompute(
|
|
950
|
-
name,
|
|
951
|
-
() => new Rule(this, name, "rule"),
|
|
952
|
-
);
|
|
953
|
-
}
|
|
954
|
-
toConfig() {
|
|
955
|
-
return this.clean(
|
|
956
|
-
Object.assign(this.entries() || {}, {
|
|
957
|
-
defaultRules: this.defaultRules.values().map((r) => r.toConfig()),
|
|
958
|
-
generator: this.generator.entries(),
|
|
959
|
-
parser: this.parser.entries(),
|
|
960
|
-
rules: this.rules.values().map((r) => r.toConfig()),
|
|
961
|
-
}),
|
|
962
|
-
);
|
|
963
|
-
}
|
|
964
|
-
merge(obj, omit = []) {
|
|
965
|
-
if (!omit.includes("rule") && "rule" in obj) {
|
|
966
|
-
Object.keys(obj.rule).forEach((name) =>
|
|
967
|
-
this.rule(name).merge(obj.rule[name]),
|
|
968
|
-
);
|
|
969
|
-
}
|
|
970
|
-
if (!omit.includes("defaultRule") && "defaultRule" in obj) {
|
|
971
|
-
Object.keys(obj.defaultRule).forEach((name) =>
|
|
972
|
-
this.defaultRule(name).merge(obj.defaultRule[name]),
|
|
973
|
-
);
|
|
974
|
-
}
|
|
975
|
-
return super.merge(obj, ["rule", "defaultRule"]);
|
|
976
|
-
}
|
|
977
|
-
};
|
|
978
|
-
},
|
|
979
|
-
247: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
980
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
981
|
-
const ChainedValueMap = __nccwpck_require__(793);
|
|
982
|
-
const Plugin = __nccwpck_require__(169);
|
|
983
|
-
module.exports = class extends ChainedMap {
|
|
984
|
-
constructor(parent) {
|
|
985
|
-
super(parent);
|
|
986
|
-
this.minimizers = new ChainedMap(this);
|
|
987
|
-
this.splitChunks = new ChainedValueMap(this);
|
|
988
|
-
this.extend([
|
|
989
|
-
"minimize",
|
|
990
|
-
"runtimeChunk",
|
|
991
|
-
"emitOnErrors",
|
|
992
|
-
"moduleIds",
|
|
993
|
-
"chunkIds",
|
|
994
|
-
"nodeEnv",
|
|
995
|
-
"mangleWasmImports",
|
|
996
|
-
"removeAvailableModules",
|
|
997
|
-
"removeEmptyChunks",
|
|
998
|
-
"mergeDuplicateChunks",
|
|
999
|
-
"flagIncludedChunks",
|
|
1000
|
-
"providedExports",
|
|
1001
|
-
"usedExports",
|
|
1002
|
-
"concatenateModules",
|
|
1003
|
-
"sideEffects",
|
|
1004
|
-
"portableRecords",
|
|
1005
|
-
"mangleExports",
|
|
1006
|
-
"innerGraph",
|
|
1007
|
-
"realContentHash",
|
|
1008
|
-
"avoidEntryIife",
|
|
1009
|
-
]);
|
|
1010
|
-
}
|
|
1011
|
-
minimizer(name) {
|
|
1012
|
-
if (Array.isArray(name)) {
|
|
1013
|
-
throw new Error(
|
|
1014
|
-
"optimization.minimizer() no longer supports being passed an array. " +
|
|
1015
|
-
"Either switch to the new syntax (https://github.com/neutrinojs/webpack-chain#config-optimization-minimizers-adding) or downgrade to webpack-chain 4. " +
|
|
1016
|
-
"If using Vue this likely means a Vue plugin has not yet been updated to support Vue CLI 4+.",
|
|
1017
|
-
);
|
|
1018
|
-
}
|
|
1019
|
-
return this.minimizers.getOrCompute(
|
|
1020
|
-
name,
|
|
1021
|
-
() => new Plugin(this, name, "optimization.minimizer"),
|
|
1022
|
-
);
|
|
1023
|
-
}
|
|
1024
|
-
toConfig() {
|
|
1025
|
-
return this.clean(
|
|
1026
|
-
Object.assign(this.entries() || {}, {
|
|
1027
|
-
splitChunks: this.splitChunks.entries(),
|
|
1028
|
-
minimizer: this.minimizers
|
|
1029
|
-
.values()
|
|
1030
|
-
.map((plugin) => plugin.toConfig()),
|
|
1031
|
-
}),
|
|
1032
|
-
);
|
|
1033
|
-
}
|
|
1034
|
-
merge(obj, omit = []) {
|
|
1035
|
-
if (!omit.includes("minimizer") && "minimizer" in obj) {
|
|
1036
|
-
Object.keys(obj.minimizer).forEach((name) =>
|
|
1037
|
-
this.minimizer(name).merge(obj.minimizer[name]),
|
|
1038
|
-
);
|
|
1039
|
-
}
|
|
1040
|
-
return super.merge(obj, [...omit, "minimizer"]);
|
|
1041
|
-
}
|
|
1042
|
-
};
|
|
1043
|
-
},
|
|
1044
|
-
956: (module) => {
|
|
1045
|
-
module.exports = (Class) =>
|
|
1046
|
-
class extends Class {
|
|
1047
|
-
before(name) {
|
|
1048
|
-
if (this.__after) {
|
|
1049
|
-
throw new Error(
|
|
1050
|
-
`Unable to set .before(${JSON.stringify(name)}) with existing value for .after()`,
|
|
1051
|
-
);
|
|
1052
|
-
}
|
|
1053
|
-
this.__before = name;
|
|
1054
|
-
return this;
|
|
1055
|
-
}
|
|
1056
|
-
after(name) {
|
|
1057
|
-
if (this.__before) {
|
|
1058
|
-
throw new Error(
|
|
1059
|
-
`Unable to set .after(${JSON.stringify(name)}) with existing value for .before()`,
|
|
1060
|
-
);
|
|
1061
|
-
}
|
|
1062
|
-
this.__after = name;
|
|
1063
|
-
return this;
|
|
1064
|
-
}
|
|
1065
|
-
merge(obj, omit = []) {
|
|
1066
|
-
if (obj.before) {
|
|
1067
|
-
this.before(obj.before);
|
|
1068
|
-
}
|
|
1069
|
-
if (obj.after) {
|
|
1070
|
-
this.after(obj.after);
|
|
1071
|
-
}
|
|
1072
|
-
return super.merge(obj, [...omit, "before", "after"]);
|
|
1073
|
-
}
|
|
1074
|
-
};
|
|
1075
|
-
},
|
|
1076
|
-
639: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1077
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
1078
|
-
module.exports = class extends ChainedMap {
|
|
1079
|
-
constructor(parent) {
|
|
1080
|
-
super(parent);
|
|
1081
|
-
this.extend([
|
|
1082
|
-
"auxiliaryComment",
|
|
1083
|
-
"charset",
|
|
1084
|
-
"chunkFilename",
|
|
1085
|
-
"chunkLoadTimeout",
|
|
1086
|
-
"chunkLoadingGlobal",
|
|
1087
|
-
"chunkLoading",
|
|
1088
|
-
"chunkFormat",
|
|
1089
|
-
"enabledChunkLoadingTypes",
|
|
1090
|
-
"crossOriginLoading",
|
|
1091
|
-
"devtoolFallbackModuleFilenameTemplate",
|
|
1092
|
-
"devtoolModuleFilenameTemplate",
|
|
1093
|
-
"devtoolNamespace",
|
|
1094
|
-
"filename",
|
|
1095
|
-
"assetModuleFilename",
|
|
1096
|
-
"globalObject",
|
|
1097
|
-
"uniqueName",
|
|
1098
|
-
"hashDigest",
|
|
1099
|
-
"hashDigestLength",
|
|
1100
|
-
"hashFunction",
|
|
1101
|
-
"hashSalt",
|
|
1102
|
-
"hotUpdateChunkFilename",
|
|
1103
|
-
"hotUpdateGlobal",
|
|
1104
|
-
"hotUpdateMainFilename",
|
|
1105
|
-
"library",
|
|
1106
|
-
"libraryExport",
|
|
1107
|
-
"libraryTarget",
|
|
1108
|
-
"importFunctionName",
|
|
1109
|
-
"path",
|
|
1110
|
-
"pathinfo",
|
|
1111
|
-
"publicPath",
|
|
1112
|
-
"scriptType",
|
|
1113
|
-
"sourceMapFilename",
|
|
1114
|
-
"sourcePrefix",
|
|
1115
|
-
"strictModuleErrorHandling",
|
|
1116
|
-
"strictModuleExceptionHandling",
|
|
1117
|
-
"umdNamedDefine",
|
|
1118
|
-
"workerChunkLoading",
|
|
1119
|
-
"enabledLibraryTypes",
|
|
1120
|
-
"environment",
|
|
1121
|
-
"compareBeforeEmit",
|
|
1122
|
-
"wasmLoading",
|
|
1123
|
-
"webassemblyModuleFilename",
|
|
1124
|
-
"enabledWasmLoadingTypes",
|
|
1125
|
-
"iife",
|
|
1126
|
-
"module",
|
|
1127
|
-
"clean",
|
|
1128
|
-
]);
|
|
1129
|
-
}
|
|
1130
|
-
};
|
|
1131
|
-
},
|
|
1132
|
-
698: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1133
|
-
const ChainedValueMap = __nccwpck_require__(793);
|
|
1134
|
-
module.exports = class extends ChainedValueMap {
|
|
1135
|
-
constructor(parent) {
|
|
1136
|
-
super(parent);
|
|
1137
|
-
this.extend([
|
|
1138
|
-
"assetFilter",
|
|
1139
|
-
"hints",
|
|
1140
|
-
"maxAssetSize",
|
|
1141
|
-
"maxEntrypointSize",
|
|
1142
|
-
]);
|
|
1143
|
-
}
|
|
1144
|
-
};
|
|
1145
|
-
},
|
|
1146
|
-
169: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1147
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
1148
|
-
const Orderable = __nccwpck_require__(956);
|
|
1149
|
-
module.exports = Orderable(
|
|
1150
|
-
class extends ChainedMap {
|
|
1151
|
-
constructor(parent, name, type = "plugin") {
|
|
1152
|
-
super(parent);
|
|
1153
|
-
this.name = name;
|
|
1154
|
-
this.type = type;
|
|
1155
|
-
this.extend(["init"]);
|
|
1156
|
-
this.init((Plugin, args = []) => {
|
|
1157
|
-
if (typeof Plugin === "function") {
|
|
1158
|
-
return new Plugin(...args);
|
|
1159
|
-
}
|
|
1160
|
-
return Plugin;
|
|
1161
|
-
});
|
|
1162
|
-
}
|
|
1163
|
-
use(plugin, args = []) {
|
|
1164
|
-
return this.set("plugin", plugin).set("args", args);
|
|
1165
|
-
}
|
|
1166
|
-
tap(f) {
|
|
1167
|
-
if (!this.has("plugin")) {
|
|
1168
|
-
throw new Error(
|
|
1169
|
-
`Cannot call .tap() on a plugin that has not yet been defined. Call ${this.type}('${this.name}').use(<Plugin>) first.`,
|
|
1170
|
-
);
|
|
1171
|
-
}
|
|
1172
|
-
this.set("args", f(this.get("args") || []));
|
|
1173
|
-
return this;
|
|
1174
|
-
}
|
|
1175
|
-
set(key, value) {
|
|
1176
|
-
if (key === "args" && !Array.isArray(value)) {
|
|
1177
|
-
throw new Error("args must be an array of arguments");
|
|
1178
|
-
}
|
|
1179
|
-
return super.set(key, value);
|
|
1180
|
-
}
|
|
1181
|
-
merge(obj, omit = []) {
|
|
1182
|
-
if ("plugin" in obj) {
|
|
1183
|
-
this.set("plugin", obj.plugin);
|
|
1184
|
-
}
|
|
1185
|
-
if ("args" in obj) {
|
|
1186
|
-
this.set("args", obj.args);
|
|
1187
|
-
}
|
|
1188
|
-
return super.merge(obj, [...omit, "args", "plugin"]);
|
|
1189
|
-
}
|
|
1190
|
-
toConfig() {
|
|
1191
|
-
const init = this.get("init");
|
|
1192
|
-
let plugin = this.get("plugin");
|
|
1193
|
-
const args = this.get("args");
|
|
1194
|
-
let pluginPath = null;
|
|
1195
|
-
if (plugin === undefined) {
|
|
1196
|
-
throw new Error(
|
|
1197
|
-
`Invalid ${this.type} configuration: ${this.type}('${this.name}').use(<Plugin>) was not called to specify the plugin`,
|
|
1198
|
-
);
|
|
1199
|
-
}
|
|
1200
|
-
if (typeof plugin === "string") {
|
|
1201
|
-
pluginPath = plugin;
|
|
1202
|
-
plugin = __nccwpck_require__(765)(pluginPath);
|
|
1203
|
-
}
|
|
1204
|
-
const constructorName = plugin.__expression
|
|
1205
|
-
? `(${plugin.__expression})`
|
|
1206
|
-
: plugin.name;
|
|
1207
|
-
const config = init(plugin, args);
|
|
1208
|
-
Object.defineProperties(config, {
|
|
1209
|
-
__pluginName: { value: this.name },
|
|
1210
|
-
__pluginType: { value: this.type },
|
|
1211
|
-
__pluginArgs: { value: args },
|
|
1212
|
-
__pluginConstructorName: { value: constructorName },
|
|
1213
|
-
__pluginPath: { value: pluginPath },
|
|
1214
|
-
});
|
|
1215
|
-
return config;
|
|
1216
|
-
}
|
|
1217
|
-
},
|
|
1218
|
-
);
|
|
1219
|
-
},
|
|
1220
|
-
212: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1221
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
1222
|
-
const ChainedSet = __nccwpck_require__(338);
|
|
1223
|
-
const Plugin = __nccwpck_require__(169);
|
|
1224
|
-
const childMaps = ["alias", "fallback", "byDependency", "extensionAlias"];
|
|
1225
|
-
const childSets = [
|
|
1226
|
-
"aliasFields",
|
|
1227
|
-
"conditionNames",
|
|
1228
|
-
"descriptionFiles",
|
|
1229
|
-
"extensions",
|
|
1230
|
-
"mainFields",
|
|
1231
|
-
"mainFiles",
|
|
1232
|
-
"exportsFields",
|
|
1233
|
-
"importsFields",
|
|
1234
|
-
"restrictions",
|
|
1235
|
-
"roots",
|
|
1236
|
-
"modules",
|
|
1237
|
-
];
|
|
1238
|
-
module.exports = class extends ChainedMap {
|
|
1239
|
-
constructor(parent) {
|
|
1240
|
-
super(parent);
|
|
1241
|
-
childMaps.forEach((key) => {
|
|
1242
|
-
this[key] = new ChainedMap(this);
|
|
1243
|
-
});
|
|
1244
|
-
childSets.forEach((key) => {
|
|
1245
|
-
this[key] = new ChainedSet(this);
|
|
1246
|
-
});
|
|
1247
|
-
this.plugins = new ChainedMap(this);
|
|
1248
|
-
this.extend([
|
|
1249
|
-
"cachePredicate",
|
|
1250
|
-
"cacheWithContext",
|
|
1251
|
-
"enforceExtension",
|
|
1252
|
-
"symlinks",
|
|
1253
|
-
"unsafeCache",
|
|
1254
|
-
"preferRelative",
|
|
1255
|
-
"preferAbsolute",
|
|
1256
|
-
"tsConfig",
|
|
1257
|
-
]);
|
|
1258
|
-
}
|
|
1259
|
-
plugin(name) {
|
|
1260
|
-
return this.plugins.getOrCompute(
|
|
1261
|
-
name,
|
|
1262
|
-
() => new Plugin(this, name, "resolve.plugin"),
|
|
1263
|
-
);
|
|
1264
|
-
}
|
|
1265
|
-
get(key) {
|
|
1266
|
-
if (childMaps.includes(key)) {
|
|
1267
|
-
return this[key].entries();
|
|
1268
|
-
}
|
|
1269
|
-
if (childSets.includes(key)) {
|
|
1270
|
-
return this[key].values();
|
|
1271
|
-
}
|
|
1272
|
-
return super.get(key);
|
|
1273
|
-
}
|
|
1274
|
-
toConfig() {
|
|
1275
|
-
const config = Object.assign(this.entries() || {}, {
|
|
1276
|
-
plugins: this.plugins.values().map((plugin) => plugin.toConfig()),
|
|
1277
|
-
});
|
|
1278
|
-
childMaps.forEach((key) => {
|
|
1279
|
-
config[key] = this[key].entries();
|
|
1280
|
-
});
|
|
1281
|
-
childSets.forEach((key) => {
|
|
1282
|
-
config[key] = this[key].values();
|
|
1283
|
-
});
|
|
1284
|
-
return this.clean(config);
|
|
1285
|
-
}
|
|
1286
|
-
merge(obj, omit = []) {
|
|
1287
|
-
if (!omit.includes("plugin") && "plugin" in obj) {
|
|
1288
|
-
Object.keys(obj.plugin).forEach((name) =>
|
|
1289
|
-
this.plugin(name).merge(obj.plugin[name]),
|
|
1290
|
-
);
|
|
1291
|
-
}
|
|
1292
|
-
const omissions = [...childMaps, ...childSets];
|
|
1293
|
-
omissions.forEach((key) => {
|
|
1294
|
-
if (!omit.includes(key) && key in obj) {
|
|
1295
|
-
this[key].merge(obj[key]);
|
|
1296
|
-
}
|
|
1297
|
-
});
|
|
1298
|
-
return super.merge(obj, [...omit, ...omissions, "plugin"]);
|
|
1299
|
-
}
|
|
1300
|
-
};
|
|
1301
|
-
},
|
|
1302
|
-
387: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1303
|
-
const Resolve = __nccwpck_require__(212);
|
|
1304
|
-
const ChainedSet = __nccwpck_require__(338);
|
|
1305
|
-
module.exports = class extends Resolve {
|
|
1306
|
-
constructor(parent) {
|
|
1307
|
-
super(parent);
|
|
1308
|
-
this.modules = new ChainedSet(this);
|
|
1309
|
-
this.moduleExtensions = new ChainedSet(this);
|
|
1310
|
-
this.packageMains = new ChainedSet(this);
|
|
1311
|
-
}
|
|
1312
|
-
toConfig() {
|
|
1313
|
-
return this.clean({
|
|
1314
|
-
modules: this.modules.values(),
|
|
1315
|
-
moduleExtensions: this.moduleExtensions.values(),
|
|
1316
|
-
packageMains: this.packageMains.values(),
|
|
1317
|
-
...super.toConfig(),
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
merge(obj, omit = []) {
|
|
1321
|
-
const omissions = ["modules", "moduleExtensions", "packageMains"];
|
|
1322
|
-
omissions.forEach((key) => {
|
|
1323
|
-
if (!omit.includes(key) && key in obj) {
|
|
1324
|
-
this[key].merge(obj[key]);
|
|
1325
|
-
}
|
|
1326
|
-
});
|
|
1327
|
-
return super.merge(obj, [...omit, ...omissions]);
|
|
1328
|
-
}
|
|
1329
|
-
};
|
|
1330
|
-
},
|
|
1331
|
-
524: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1332
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
1333
|
-
const ChainedSet = __nccwpck_require__(338);
|
|
1334
|
-
const Orderable = __nccwpck_require__(956);
|
|
1335
|
-
const Use = __nccwpck_require__(487);
|
|
1336
|
-
const Resolve = __nccwpck_require__(212);
|
|
1337
|
-
function toArray(arr) {
|
|
1338
|
-
return Array.isArray(arr) ? arr : [arr];
|
|
1339
|
-
}
|
|
1340
|
-
const Rule = Orderable(
|
|
1341
|
-
class extends ChainedMap {
|
|
1342
|
-
constructor(parent, name, ruleType = "rule") {
|
|
1343
|
-
super(parent);
|
|
1344
|
-
this.ruleName = name;
|
|
1345
|
-
this.names = [];
|
|
1346
|
-
this.ruleType = ruleType;
|
|
1347
|
-
this.ruleTypes = [];
|
|
1348
|
-
let rule = this;
|
|
1349
|
-
while (rule instanceof Rule) {
|
|
1350
|
-
this.names.unshift(rule.ruleName);
|
|
1351
|
-
this.ruleTypes.unshift(rule.ruleType);
|
|
1352
|
-
rule = rule.parent;
|
|
1353
|
-
}
|
|
1354
|
-
this.uses = new ChainedMap(this);
|
|
1355
|
-
this.include = new ChainedSet(this);
|
|
1356
|
-
this.exclude = new ChainedSet(this);
|
|
1357
|
-
this.rules = new ChainedMap(this);
|
|
1358
|
-
this.oneOfs = new ChainedMap(this);
|
|
1359
|
-
this.resolve = new Resolve(this);
|
|
1360
|
-
this.resolve.extend(["fullySpecified"]);
|
|
1361
|
-
this.extend([
|
|
1362
|
-
"dependency",
|
|
1363
|
-
"enforce",
|
|
1364
|
-
"issuer",
|
|
1365
|
-
"issuerLayer",
|
|
1366
|
-
"layer",
|
|
1367
|
-
"mimetype",
|
|
1368
|
-
"parser",
|
|
1369
|
-
"generator",
|
|
1370
|
-
"resource",
|
|
1371
|
-
"resourceFragment",
|
|
1372
|
-
"resourceQuery",
|
|
1373
|
-
"sideEffects",
|
|
1374
|
-
"with",
|
|
1375
|
-
"test",
|
|
1376
|
-
"type",
|
|
1377
|
-
]);
|
|
1378
|
-
}
|
|
1379
|
-
use(name) {
|
|
1380
|
-
return this.uses.getOrCompute(name, () => new Use(this, name));
|
|
1381
|
-
}
|
|
1382
|
-
rule(name) {
|
|
1383
|
-
return this.rules.getOrCompute(
|
|
1384
|
-
name,
|
|
1385
|
-
() => new Rule(this, name, "rule"),
|
|
1386
|
-
);
|
|
1387
|
-
}
|
|
1388
|
-
oneOf(name) {
|
|
1389
|
-
return this.oneOfs.getOrCompute(
|
|
1390
|
-
name,
|
|
1391
|
-
() => new Rule(this, name, "oneOf"),
|
|
1392
|
-
);
|
|
1393
|
-
}
|
|
1394
|
-
pre() {
|
|
1395
|
-
return this.enforce("pre");
|
|
1396
|
-
}
|
|
1397
|
-
post() {
|
|
1398
|
-
return this.enforce("post");
|
|
1399
|
-
}
|
|
1400
|
-
toConfig() {
|
|
1401
|
-
const config = this.clean(
|
|
1402
|
-
Object.assign(this.entries() || {}, {
|
|
1403
|
-
include: this.include.values(),
|
|
1404
|
-
exclude: this.exclude.values(),
|
|
1405
|
-
rules: this.rules.values().map((rule) => rule.toConfig()),
|
|
1406
|
-
oneOf: this.oneOfs.values().map((oneOf) => oneOf.toConfig()),
|
|
1407
|
-
use: this.uses.values().map((use) => use.toConfig()),
|
|
1408
|
-
resolve: this.resolve.toConfig(),
|
|
1409
|
-
}),
|
|
1410
|
-
);
|
|
1411
|
-
Object.defineProperties(config, {
|
|
1412
|
-
__ruleNames: { value: this.names },
|
|
1413
|
-
__ruleTypes: { value: this.ruleTypes },
|
|
1414
|
-
});
|
|
1415
|
-
return config;
|
|
1416
|
-
}
|
|
1417
|
-
merge(obj, omit = []) {
|
|
1418
|
-
if (!omit.includes("include") && "include" in obj) {
|
|
1419
|
-
this.include.merge(toArray(obj.include));
|
|
1420
|
-
}
|
|
1421
|
-
if (!omit.includes("exclude") && "exclude" in obj) {
|
|
1422
|
-
this.exclude.merge(toArray(obj.exclude));
|
|
1423
|
-
}
|
|
1424
|
-
if (!omit.includes("use") && "use" in obj) {
|
|
1425
|
-
Object.keys(obj.use).forEach((name) =>
|
|
1426
|
-
this.use(name).merge(obj.use[name]),
|
|
1427
|
-
);
|
|
1428
|
-
}
|
|
1429
|
-
if (!omit.includes("rules") && "rules" in obj) {
|
|
1430
|
-
Object.keys(obj.rules).forEach((name) =>
|
|
1431
|
-
this.rule(name).merge(obj.rules[name]),
|
|
1432
|
-
);
|
|
1433
|
-
}
|
|
1434
|
-
if (!omit.includes("oneOf") && "oneOf" in obj) {
|
|
1435
|
-
Object.keys(obj.oneOf).forEach((name) =>
|
|
1436
|
-
this.oneOf(name).merge(obj.oneOf[name]),
|
|
1437
|
-
);
|
|
1438
|
-
}
|
|
1439
|
-
if (!omit.includes("resolve") && "resolve" in obj) {
|
|
1440
|
-
this.resolve.merge(obj.resolve);
|
|
1441
|
-
}
|
|
1442
|
-
if (!omit.includes("test") && "test" in obj) {
|
|
1443
|
-
this.test(
|
|
1444
|
-
obj.test instanceof RegExp || typeof obj.test === "function"
|
|
1445
|
-
? obj.test
|
|
1446
|
-
: new RegExp(obj.test),
|
|
1447
|
-
);
|
|
1448
|
-
}
|
|
1449
|
-
return super.merge(obj, [
|
|
1450
|
-
...omit,
|
|
1451
|
-
"include",
|
|
1452
|
-
"exclude",
|
|
1453
|
-
"use",
|
|
1454
|
-
"rules",
|
|
1455
|
-
"oneOf",
|
|
1456
|
-
"resolve",
|
|
1457
|
-
"test",
|
|
1458
|
-
]);
|
|
1459
|
-
}
|
|
1460
|
-
},
|
|
1461
|
-
);
|
|
1462
|
-
module.exports = Rule;
|
|
1463
|
-
},
|
|
1464
|
-
487: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1465
|
-
const merge = __nccwpck_require__(779);
|
|
1466
|
-
const ChainedMap = __nccwpck_require__(560);
|
|
1467
|
-
const Orderable = __nccwpck_require__(956);
|
|
1468
|
-
module.exports = Orderable(
|
|
1469
|
-
class extends ChainedMap {
|
|
1470
|
-
constructor(parent, name) {
|
|
1471
|
-
super(parent);
|
|
1472
|
-
this.name = name;
|
|
1473
|
-
this.extend(["loader", "options", "parallel"]);
|
|
1474
|
-
}
|
|
1475
|
-
tap(f) {
|
|
1476
|
-
this.options(f(this.get("options")));
|
|
1477
|
-
return this;
|
|
1478
|
-
}
|
|
1479
|
-
merge(obj, omit = []) {
|
|
1480
|
-
if (!omit.includes("loader") && "loader" in obj) {
|
|
1481
|
-
this.loader(obj.loader);
|
|
1482
|
-
}
|
|
1483
|
-
if (!omit.includes("options") && "options" in obj) {
|
|
1484
|
-
this.options(merge(this.store.get("options") || {}, obj.options));
|
|
1485
|
-
}
|
|
1486
|
-
return super.merge(obj, [...omit, "loader", "options"]);
|
|
1487
|
-
}
|
|
1488
|
-
toConfig() {
|
|
1489
|
-
const config = this.clean(this.entries() || {});
|
|
1490
|
-
Object.defineProperties(config, {
|
|
1491
|
-
__useName: { value: this.name },
|
|
1492
|
-
__ruleNames: { value: this.parent && this.parent.names },
|
|
1493
|
-
__ruleTypes: { value: this.parent && this.parent.ruleTypes },
|
|
1494
|
-
});
|
|
1495
|
-
return config;
|
|
1496
|
-
}
|
|
1497
|
-
},
|
|
1498
|
-
);
|
|
1499
|
-
},
|
|
1500
|
-
626: (module) => {
|
|
1501
|
-
module.exports = function createChainable(superClass) {
|
|
1502
|
-
return class extends superClass {
|
|
1503
|
-
constructor(parent) {
|
|
1504
|
-
super();
|
|
1505
|
-
this.parent = parent;
|
|
1506
|
-
}
|
|
1507
|
-
batch(handler) {
|
|
1508
|
-
handler(this);
|
|
1509
|
-
return this;
|
|
1510
|
-
}
|
|
1511
|
-
end() {
|
|
1512
|
-
return this.parent;
|
|
1513
|
-
}
|
|
1514
|
-
};
|
|
1515
|
-
};
|
|
1516
|
-
},
|
|
1517
|
-
777: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1518
|
-
const merge = __nccwpck_require__(779);
|
|
1519
|
-
module.exports = function createMap(superClass) {
|
|
1520
|
-
return class extends superClass {
|
|
1521
|
-
constructor(...args) {
|
|
1522
|
-
super(...args);
|
|
1523
|
-
this.store = new Map();
|
|
1524
|
-
}
|
|
1525
|
-
extend(methods) {
|
|
1526
|
-
this.shorthands = methods;
|
|
1527
|
-
methods.forEach((method) => {
|
|
1528
|
-
this[method] = (value) => this.set(method, value);
|
|
1529
|
-
});
|
|
1530
|
-
return this;
|
|
1531
|
-
}
|
|
1532
|
-
clear() {
|
|
1533
|
-
this.store.clear();
|
|
1534
|
-
return this;
|
|
1535
|
-
}
|
|
1536
|
-
delete(key) {
|
|
1537
|
-
this.store.delete(key);
|
|
1538
|
-
return this;
|
|
1539
|
-
}
|
|
1540
|
-
order() {
|
|
1541
|
-
const entries = [...this.store].reduce((acc, [key, value]) => {
|
|
1542
|
-
acc[key] = value;
|
|
1543
|
-
return acc;
|
|
1544
|
-
}, {});
|
|
1545
|
-
const names = Object.keys(entries);
|
|
1546
|
-
const order = [...names];
|
|
1547
|
-
names.forEach((name) => {
|
|
1548
|
-
if (!entries[name]) {
|
|
1549
|
-
return;
|
|
1550
|
-
}
|
|
1551
|
-
const { __before, __after } = entries[name];
|
|
1552
|
-
if (__before && order.includes(__before)) {
|
|
1553
|
-
order.splice(order.indexOf(name), 1);
|
|
1554
|
-
order.splice(order.indexOf(__before), 0, name);
|
|
1555
|
-
} else if (__after && order.includes(__after)) {
|
|
1556
|
-
order.splice(order.indexOf(name), 1);
|
|
1557
|
-
order.splice(order.indexOf(__after) + 1, 0, name);
|
|
1558
|
-
}
|
|
1559
|
-
});
|
|
1560
|
-
return { entries, order };
|
|
1561
|
-
}
|
|
1562
|
-
entries() {
|
|
1563
|
-
const { entries, order } = this.order();
|
|
1564
|
-
if (order.length) {
|
|
1565
|
-
return entries;
|
|
1566
|
-
}
|
|
1567
|
-
return undefined;
|
|
1568
|
-
}
|
|
1569
|
-
values() {
|
|
1570
|
-
const { entries, order } = this.order();
|
|
1571
|
-
return order.map((name) => entries[name]);
|
|
1572
|
-
}
|
|
1573
|
-
get(key) {
|
|
1574
|
-
return this.store.get(key);
|
|
1575
|
-
}
|
|
1576
|
-
getOrCompute(key, fn) {
|
|
1577
|
-
if (!this.has(key)) {
|
|
1578
|
-
this.set(key, fn());
|
|
1579
|
-
}
|
|
1580
|
-
return this.get(key);
|
|
1581
|
-
}
|
|
1582
|
-
has(key) {
|
|
1583
|
-
return this.store.has(key);
|
|
1584
|
-
}
|
|
1585
|
-
set(key, value) {
|
|
1586
|
-
this.store.set(key, value);
|
|
1587
|
-
return this;
|
|
1588
|
-
}
|
|
1589
|
-
merge(obj, omit = []) {
|
|
1590
|
-
Object.keys(obj).forEach((key) => {
|
|
1591
|
-
if (omit.includes(key)) {
|
|
1592
|
-
return;
|
|
1593
|
-
}
|
|
1594
|
-
const value = obj[key];
|
|
1595
|
-
if (
|
|
1596
|
-
(!Array.isArray(value) && typeof value !== "object") ||
|
|
1597
|
-
value === null ||
|
|
1598
|
-
!this.has(key)
|
|
1599
|
-
) {
|
|
1600
|
-
this.set(key, value);
|
|
1601
|
-
} else {
|
|
1602
|
-
this.set(key, merge(this.get(key), value));
|
|
1603
|
-
}
|
|
1604
|
-
});
|
|
1605
|
-
return this;
|
|
1606
|
-
}
|
|
1607
|
-
clean(obj) {
|
|
1608
|
-
return Object.keys(obj).reduce((acc, key) => {
|
|
1609
|
-
const value = obj[key];
|
|
1610
|
-
if (value === undefined) {
|
|
1611
|
-
return acc;
|
|
1612
|
-
}
|
|
1613
|
-
if (Array.isArray(value) && !value.length) {
|
|
1614
|
-
return acc;
|
|
1615
|
-
}
|
|
1616
|
-
if (
|
|
1617
|
-
Object.prototype.toString.call(value) === "[object Object]" &&
|
|
1618
|
-
!Object.keys(value).length
|
|
1619
|
-
) {
|
|
1620
|
-
return acc;
|
|
1621
|
-
}
|
|
1622
|
-
acc[key] = value;
|
|
1623
|
-
return acc;
|
|
1624
|
-
}, {});
|
|
1625
|
-
}
|
|
1626
|
-
when(
|
|
1627
|
-
condition,
|
|
1628
|
-
whenTruthy = Function.prototype,
|
|
1629
|
-
whenFalsy = Function.prototype,
|
|
1630
|
-
) {
|
|
1631
|
-
if (condition) {
|
|
1632
|
-
whenTruthy(this);
|
|
1633
|
-
} else {
|
|
1634
|
-
whenFalsy(this);
|
|
1635
|
-
}
|
|
1636
|
-
return this;
|
|
1637
|
-
}
|
|
1638
|
-
};
|
|
1639
|
-
};
|
|
1640
|
-
},
|
|
1641
|
-
551: (module) => {
|
|
1642
|
-
module.exports = function createSet(superClass) {
|
|
1643
|
-
return class extends superClass {
|
|
1644
|
-
constructor(...args) {
|
|
1645
|
-
super(...args);
|
|
1646
|
-
this.store = new Set();
|
|
1647
|
-
}
|
|
1648
|
-
add(value) {
|
|
1649
|
-
this.store.add(value);
|
|
1650
|
-
return this;
|
|
1651
|
-
}
|
|
1652
|
-
prepend(value) {
|
|
1653
|
-
this.store = new Set([value, ...this.store]);
|
|
1654
|
-
return this;
|
|
1655
|
-
}
|
|
1656
|
-
clear() {
|
|
1657
|
-
this.store.clear();
|
|
1658
|
-
return this;
|
|
1659
|
-
}
|
|
1660
|
-
delete(value) {
|
|
1661
|
-
this.store.delete(value);
|
|
1662
|
-
return this;
|
|
1663
|
-
}
|
|
1664
|
-
values() {
|
|
1665
|
-
return [...this.store];
|
|
1666
|
-
}
|
|
1667
|
-
has(value) {
|
|
1668
|
-
return this.store.has(value);
|
|
1669
|
-
}
|
|
1670
|
-
merge(arr) {
|
|
1671
|
-
if (arr !== undefined) {
|
|
1672
|
-
this.store = new Set([...this.store, ...arr]);
|
|
1673
|
-
}
|
|
1674
|
-
return this;
|
|
1675
|
-
}
|
|
1676
|
-
when(
|
|
1677
|
-
condition,
|
|
1678
|
-
whenTruthy = Function.prototype,
|
|
1679
|
-
whenFalsy = Function.prototype,
|
|
1680
|
-
) {
|
|
1681
|
-
if (condition) {
|
|
1682
|
-
whenTruthy(this);
|
|
1683
|
-
} else {
|
|
1684
|
-
whenFalsy(this);
|
|
1685
|
-
}
|
|
1686
|
-
return this;
|
|
1687
|
-
}
|
|
1688
|
-
};
|
|
1689
|
-
};
|
|
1690
|
-
},
|
|
1691
|
-
322: (module) => {
|
|
1692
|
-
module.exports = function createValue(superClass) {
|
|
1693
|
-
return class extends superClass {
|
|
1694
|
-
constructor(...args) {
|
|
1695
|
-
super(...args);
|
|
1696
|
-
this.value = undefined;
|
|
1697
|
-
this.useMap = true;
|
|
1698
|
-
}
|
|
1699
|
-
set(...args) {
|
|
1700
|
-
this.useMap = true;
|
|
1701
|
-
this.value = undefined;
|
|
1702
|
-
return super.set(...args);
|
|
1703
|
-
}
|
|
1704
|
-
clear() {
|
|
1705
|
-
this.value = undefined;
|
|
1706
|
-
return super.clear();
|
|
1707
|
-
}
|
|
1708
|
-
classCall(value) {
|
|
1709
|
-
this.clear();
|
|
1710
|
-
this.useMap = false;
|
|
1711
|
-
this.value = value;
|
|
1712
|
-
return this.parent;
|
|
1713
|
-
}
|
|
1714
|
-
entries() {
|
|
1715
|
-
if (this.useMap) {
|
|
1716
|
-
return super.entries();
|
|
1717
|
-
}
|
|
1718
|
-
return this.value;
|
|
1719
|
-
}
|
|
1720
|
-
values() {
|
|
1721
|
-
if (this.useMap) {
|
|
1722
|
-
return super.values();
|
|
1723
|
-
}
|
|
1724
|
-
return this.value;
|
|
1725
|
-
}
|
|
1726
|
-
};
|
|
1727
|
-
};
|
|
1728
|
-
},
|
|
1729
|
-
765: (module) => {
|
|
1730
|
-
function webpackEmptyContext(req) {
|
|
1731
|
-
var e = new Error("Cannot find module '" + req + "'");
|
|
1732
|
-
e.code = "MODULE_NOT_FOUND";
|
|
1733
|
-
throw e;
|
|
1734
|
-
}
|
|
1735
|
-
webpackEmptyContext.keys = () => [];
|
|
1736
|
-
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
1737
|
-
webpackEmptyContext.id = 765;
|
|
1738
|
-
module.exports = webpackEmptyContext;
|
|
1739
|
-
},
|
|
1740
|
-
};
|
|
1741
|
-
var __webpack_module_cache__ = {};
|
|
1742
|
-
function __nccwpck_require__(moduleId) {
|
|
1743
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
1744
|
-
if (cachedModule !== undefined) {
|
|
1745
|
-
return cachedModule.exports;
|
|
1746
|
-
}
|
|
1747
|
-
var module = (__webpack_module_cache__[moduleId] = { exports: {} });
|
|
1748
|
-
var threw = true;
|
|
1749
|
-
try {
|
|
1750
|
-
__webpack_modules__[moduleId](
|
|
1751
|
-
module,
|
|
1752
|
-
module.exports,
|
|
1753
|
-
__nccwpck_require__,
|
|
1754
|
-
);
|
|
1755
|
-
threw = false;
|
|
1756
|
-
} finally {
|
|
1757
|
-
if (threw) delete __webpack_module_cache__[moduleId];
|
|
1758
|
-
}
|
|
1759
|
-
return module.exports;
|
|
1760
|
-
}
|
|
1761
|
-
(() => {
|
|
1762
|
-
__nccwpck_require__.o = (obj, prop) =>
|
|
1763
|
-
Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1764
|
-
})();
|
|
1765
|
-
if (typeof __nccwpck_require__ !== "undefined")
|
|
1766
|
-
__nccwpck_require__.ab = __dirname + "/";
|
|
1767
|
-
var __webpack_exports__ = __nccwpck_require__(0);
|
|
1768
|
-
module.exports = __webpack_exports__;
|
|
1769
|
-
})();
|