@rsbuild/core 2.0.3 → 2.0.4
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 +2 -2
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/http-proxy-middleware/index.d.ts +1 -28
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/jiti/README.md +15 -0
- package/compiled/jiti/dist/babel.cjs +3736 -3036
- package/compiled/jiti/dist/jiti.cjs +2808 -1660
- package/compiled/jiti/lib/jiti-static.mjs +19 -0
- package/compiled/jiti/lib/types.d.ts +57 -0
- package/compiled/jiti/package.json +56 -43
- package/compiled/postcss/index.js +1 -1
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-loader/index.js +8 -8
- package/compiled/style-loader/index.js +10 -10
- package/dist/753.js +130 -35
- package/dist/client/hmr.js +21 -9
- package/dist/http-proxy-middleware.js +169 -17
- package/dist/manifest-plugin.js +6 -6
- package/dist/memfs.js +3 -3
- package/dist-types/constants.d.ts +5 -0
- package/dist-types/helpers/vendors.d.ts +0 -1
- package/dist-types/index.d.ts +1 -1
- package/dist-types/server/socketServer.d.ts +1 -0
- package/dist-types/types/config.d.ts +27 -5
- package/package.json +6 -6
- package/compiled/webpack-merge/index.d.ts +0 -31
- package/compiled/webpack-merge/index.js +0 -1200
- package/compiled/webpack-merge/license +0 -20
- package/compiled/webpack-merge/package.json +0 -1
|
@@ -873,7 +873,7 @@ __webpack_require__.add({
|
|
|
873
873
|
};
|
|
874
874
|
},
|
|
875
875
|
"../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
876
|
-
let util = __webpack_require__("util"), braces = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"), picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.
|
|
876
|
+
let util = __webpack_require__("util"), braces = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"), picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"), isEmptyString = (v)=>'' === v || './' === v, hasBraces = (v)=>{
|
|
877
877
|
let index = v.indexOf('{');
|
|
878
878
|
return index > -1 && v.indexOf('}', index) > -1;
|
|
879
879
|
}, micromatch = (list, patterns, options)=>{
|
|
@@ -1040,10 +1040,10 @@ __webpack_require__.add({
|
|
|
1040
1040
|
throw Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
|
1041
1041
|
};
|
|
1042
1042
|
},
|
|
1043
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
1044
|
-
module.exports = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.
|
|
1043
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1044
|
+
module.exports = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js");
|
|
1045
1045
|
},
|
|
1046
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
1046
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1047
1047
|
let path = __webpack_require__("path?aeb1"), WIN_NO_SLASH = "[^\\\\/]", QMARK = '[^/]', END_ANCHOR = "(?:\\/|$)", START_ANCHOR = "(?:^|\\/)", DOTS_SLASH = `\\.{1,2}${END_ANCHOR}`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!\\.{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, STAR = `${QMARK}*?`, POSIX_CHARS = {
|
|
1048
1048
|
DOT_LITERAL: '\\.',
|
|
1049
1049
|
PLUS_LITERAL: '\\+',
|
|
@@ -1075,8 +1075,10 @@ __webpack_require__.add({
|
|
|
1075
1075
|
END_ANCHOR: "(?:[\\\\/]|$)"
|
|
1076
1076
|
};
|
|
1077
1077
|
module.exports = {
|
|
1078
|
+
DEFAULT_MAX_EXTGLOB_RECURSION: 0,
|
|
1078
1079
|
MAX_LENGTH: 65536,
|
|
1079
1080
|
POSIX_REGEX_SOURCE: {
|
|
1081
|
+
__proto__: null,
|
|
1080
1082
|
alnum: 'a-zA-Z0-9',
|
|
1081
1083
|
alpha: 'a-zA-Z',
|
|
1082
1084
|
ascii: '\\x00-\\x7F',
|
|
@@ -1099,6 +1101,7 @@ __webpack_require__.add({
|
|
|
1099
1101
|
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
1100
1102
|
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
1101
1103
|
REPLACEMENTS: {
|
|
1104
|
+
__proto__: null,
|
|
1102
1105
|
'***': '*',
|
|
1103
1106
|
'**/**': '**',
|
|
1104
1107
|
'**/**/**': '**'
|
|
@@ -1177,8 +1180,8 @@ __webpack_require__.add({
|
|
|
1177
1180
|
globChars: (win32)=>!0 === win32 ? WINDOWS_CHARS : POSIX_CHARS
|
|
1178
1181
|
};
|
|
1179
1182
|
},
|
|
1180
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
1181
|
-
let constants = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.
|
|
1183
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1184
|
+
let constants = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"), { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants, expandRange = (args, options)=>{
|
|
1182
1185
|
if ('function' == typeof options.expandRange) return options.expandRange(...args, options);
|
|
1183
1186
|
args.sort();
|
|
1184
1187
|
let value = `[${args.join('-')}]`;
|
|
@@ -1188,7 +1191,115 @@ __webpack_require__.add({
|
|
|
1188
1191
|
return args.map((v)=>utils.escapeRegex(v)).join('..');
|
|
1189
1192
|
}
|
|
1190
1193
|
return value;
|
|
1191
|
-
}, syntaxError = (type, char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`,
|
|
1194
|
+
}, syntaxError = (type, char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, splitTopLevel = (input)=>{
|
|
1195
|
+
let parts = [], bracket = 0, paren = 0, quote = 0, value = '', escaped = !1;
|
|
1196
|
+
for (let ch of input){
|
|
1197
|
+
if (!0 === escaped) {
|
|
1198
|
+
value += ch, escaped = !1;
|
|
1199
|
+
continue;
|
|
1200
|
+
}
|
|
1201
|
+
if ('\\' === ch) {
|
|
1202
|
+
value += ch, escaped = !0;
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
if ('"' === ch) {
|
|
1206
|
+
quote = +(1 !== quote), value += ch;
|
|
1207
|
+
continue;
|
|
1208
|
+
}
|
|
1209
|
+
if (0 === quote) {
|
|
1210
|
+
if ('[' === ch) bracket++;
|
|
1211
|
+
else if (']' === ch && bracket > 0) bracket--;
|
|
1212
|
+
else if (0 === bracket) {
|
|
1213
|
+
if ('(' === ch) paren++;
|
|
1214
|
+
else if (')' === ch && paren > 0) paren--;
|
|
1215
|
+
else if ('|' === ch && 0 === paren) {
|
|
1216
|
+
parts.push(value), value = '';
|
|
1217
|
+
continue;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
value += ch;
|
|
1222
|
+
}
|
|
1223
|
+
return parts.push(value), parts;
|
|
1224
|
+
}, normalizeSimpleBranch = (branch)=>{
|
|
1225
|
+
let value = branch.trim(), changed = !0;
|
|
1226
|
+
for(; !0 === changed;)changed = !1, /^@\([^\\()[\]{}|]+\)$/.test(value) && (value = value.slice(2, -1), changed = !0);
|
|
1227
|
+
if (((branch)=>{
|
|
1228
|
+
let escaped = !1;
|
|
1229
|
+
for (let ch of branch){
|
|
1230
|
+
if (!0 === escaped) {
|
|
1231
|
+
escaped = !1;
|
|
1232
|
+
continue;
|
|
1233
|
+
}
|
|
1234
|
+
if ('\\' === ch) {
|
|
1235
|
+
escaped = !0;
|
|
1236
|
+
continue;
|
|
1237
|
+
}
|
|
1238
|
+
if (/[?*+@!()[\]{}]/.test(ch)) return !1;
|
|
1239
|
+
}
|
|
1240
|
+
return !0;
|
|
1241
|
+
})(value)) return value.replace(/\\(.)/g, '$1');
|
|
1242
|
+
}, parseRepeatedExtglob = (pattern, requireEnd = !0)=>{
|
|
1243
|
+
if ('+' !== pattern[0] && '*' !== pattern[0] || '(' !== pattern[1]) return;
|
|
1244
|
+
let bracket = 0, paren = 0, quote = 0, escaped = !1;
|
|
1245
|
+
for(let i = 1; i < pattern.length; i++){
|
|
1246
|
+
let ch = pattern[i];
|
|
1247
|
+
if (!0 === escaped) {
|
|
1248
|
+
escaped = !1;
|
|
1249
|
+
continue;
|
|
1250
|
+
}
|
|
1251
|
+
if ('\\' === ch) {
|
|
1252
|
+
escaped = !0;
|
|
1253
|
+
continue;
|
|
1254
|
+
}
|
|
1255
|
+
if ('"' === ch) {
|
|
1256
|
+
quote = +(1 !== quote);
|
|
1257
|
+
continue;
|
|
1258
|
+
}
|
|
1259
|
+
if (1 !== quote) {
|
|
1260
|
+
if ('[' === ch) {
|
|
1261
|
+
bracket++;
|
|
1262
|
+
continue;
|
|
1263
|
+
}
|
|
1264
|
+
if (']' === ch && bracket > 0) {
|
|
1265
|
+
bracket--;
|
|
1266
|
+
continue;
|
|
1267
|
+
}
|
|
1268
|
+
if (!(bracket > 0)) {
|
|
1269
|
+
if ('(' === ch) {
|
|
1270
|
+
paren++;
|
|
1271
|
+
continue;
|
|
1272
|
+
}
|
|
1273
|
+
if (')' === ch && 0 == --paren) {
|
|
1274
|
+
if (!0 === requireEnd && i !== pattern.length - 1) return;
|
|
1275
|
+
return {
|
|
1276
|
+
type: pattern[0],
|
|
1277
|
+
body: pattern.slice(2, i),
|
|
1278
|
+
end: i
|
|
1279
|
+
};
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}, getStarExtglobSequenceOutput = (pattern)=>{
|
|
1285
|
+
let index = 0, chars = [];
|
|
1286
|
+
for(; index < pattern.length;){
|
|
1287
|
+
let match = parseRepeatedExtglob(pattern.slice(index), !1);
|
|
1288
|
+
if (!match || '*' !== match.type) return;
|
|
1289
|
+
let branches = splitTopLevel(match.body).map((branch)=>branch.trim());
|
|
1290
|
+
if (1 !== branches.length) return;
|
|
1291
|
+
let branch = normalizeSimpleBranch(branches[0]);
|
|
1292
|
+
if (!branch || 1 !== branch.length) return;
|
|
1293
|
+
chars.push(branch), index += match.end + 1;
|
|
1294
|
+
}
|
|
1295
|
+
if (chars.length < 1) return;
|
|
1296
|
+
let source = 1 === chars.length ? utils.escapeRegex(chars[0]) : `[${chars.map((ch)=>utils.escapeRegex(ch)).join('')}]`;
|
|
1297
|
+
return `${source}*`;
|
|
1298
|
+
}, repeatedExtglobRecursion = (pattern)=>{
|
|
1299
|
+
let depth = 0, value = pattern.trim(), match = parseRepeatedExtglob(value);
|
|
1300
|
+
for(; match;)depth++, match = parseRepeatedExtglob(value = match.body.trim());
|
|
1301
|
+
return depth;
|
|
1302
|
+
}, parse = (input, options)=>{
|
|
1192
1303
|
let value;
|
|
1193
1304
|
if ('string' != typeof input) throw TypeError('Expected a string');
|
|
1194
1305
|
input = REPLACEMENTS[input] || input;
|
|
@@ -1250,7 +1361,7 @@ __webpack_require__.add({
|
|
|
1250
1361
|
conditions: 1,
|
|
1251
1362
|
inner: ''
|
|
1252
1363
|
};
|
|
1253
|
-
token.prev = prev, token.parens = state.parens, token.output = state.output;
|
|
1364
|
+
token.prev = prev, token.parens = state.parens, token.output = state.output, token.startIndex = state.index, token.tokensIndex = tokens.length;
|
|
1254
1365
|
let output = (opts.capture ? '(' : '') + token.open;
|
|
1255
1366
|
increment('parens'), push({
|
|
1256
1367
|
type,
|
|
@@ -1263,7 +1374,48 @@ __webpack_require__.add({
|
|
|
1263
1374
|
output
|
|
1264
1375
|
}), extglobs.push(token);
|
|
1265
1376
|
}, extglobClose = (token)=>{
|
|
1266
|
-
let rest,
|
|
1377
|
+
let rest, literal = input.slice(token.startIndex, state.index + 1), analysis = ((body, options)=>{
|
|
1378
|
+
if (!1 === options.maxExtglobRecursion) return {
|
|
1379
|
+
risky: !1
|
|
1380
|
+
};
|
|
1381
|
+
let max = 'number' == typeof options.maxExtglobRecursion ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION, branches = splitTopLevel(body).map((branch)=>branch.trim());
|
|
1382
|
+
if (branches.length > 1 && (branches.some((branch)=>'' === branch) || branches.some((branch)=>/^[*?]+$/.test(branch)) || ((branches)=>{
|
|
1383
|
+
let values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
1384
|
+
for(let i = 0; i < values.length; i++)for(let j = i + 1; j < values.length; j++){
|
|
1385
|
+
let a = values[i], b = values[j], char = a[0];
|
|
1386
|
+
if (char && a === char.repeat(a.length) && b === char.repeat(b.length) && (a === b || a.startsWith(b) || b.startsWith(a))) return !0;
|
|
1387
|
+
}
|
|
1388
|
+
return !1;
|
|
1389
|
+
})(branches))) return {
|
|
1390
|
+
risky: !0
|
|
1391
|
+
};
|
|
1392
|
+
for (let branch of branches){
|
|
1393
|
+
let safeOutput = getStarExtglobSequenceOutput(branch);
|
|
1394
|
+
if (safeOutput) return {
|
|
1395
|
+
risky: !0,
|
|
1396
|
+
safeOutput
|
|
1397
|
+
};
|
|
1398
|
+
if (repeatedExtglobRecursion(branch) > max) return {
|
|
1399
|
+
risky: !0
|
|
1400
|
+
};
|
|
1401
|
+
}
|
|
1402
|
+
return {
|
|
1403
|
+
risky: !1
|
|
1404
|
+
};
|
|
1405
|
+
})(input.slice(token.startIndex + 2, state.index), opts);
|
|
1406
|
+
if (('plus' === token.type || 'star' === token.type) && analysis.risky) {
|
|
1407
|
+
let safeOutput = analysis.safeOutput ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0, open = tokens[token.tokensIndex];
|
|
1408
|
+
open.type = 'text', open.value = literal, open.output = safeOutput || utils.escapeRegex(literal);
|
|
1409
|
+
for(let i = token.tokensIndex + 1; i < tokens.length; i++)tokens[i].value = '', tokens[i].output = '', delete tokens[i].suffix;
|
|
1410
|
+
state.output = token.output + open.output, state.backtrack = !0, push({
|
|
1411
|
+
type: 'paren',
|
|
1412
|
+
extglob: !0,
|
|
1413
|
+
value,
|
|
1414
|
+
output: ''
|
|
1415
|
+
}), decrement('parens');
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1418
|
+
let output = token.close + (opts.capture ? ')' : '');
|
|
1267
1419
|
if ('negate' === token.type) {
|
|
1268
1420
|
let extglobStar = star;
|
|
1269
1421
|
if (token.inner && token.inner.length > 1 && token.inner.includes('/') && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
@@ -1721,8 +1873,8 @@ __webpack_require__.add({
|
|
|
1721
1873
|
return source && !0 !== opts.strictSlashes && (source += `${SLASH_LITERAL}?`), source;
|
|
1722
1874
|
}, module.exports = parse;
|
|
1723
1875
|
},
|
|
1724
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
1725
|
-
let path = __webpack_require__("path?aeb1"), scan = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.
|
|
1876
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1877
|
+
let path = __webpack_require__("path?aeb1"), scan = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js"), parse = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js"), utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"), constants = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"), picomatch = (glob, options, returnState = !1)=>{
|
|
1726
1878
|
if (Array.isArray(glob)) {
|
|
1727
1879
|
let fns = glob.map((input)=>picomatch(input, options, returnState));
|
|
1728
1880
|
return (str)=>{
|
|
@@ -1803,8 +1955,8 @@ __webpack_require__.add({
|
|
|
1803
1955
|
}
|
|
1804
1956
|
}, picomatch.constants = constants, module.exports = picomatch;
|
|
1805
1957
|
},
|
|
1806
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
1807
|
-
let utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.
|
|
1958
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js" (module, __unused_rspack_exports, __webpack_require__) {
|
|
1959
|
+
let utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"), { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"), isPathSeparator = (code)=>code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token)=>{
|
|
1808
1960
|
!0 !== token.isPrefix && (token.depth = token.isGlobstar ? 1 / 0 : 1);
|
|
1809
1961
|
};
|
|
1810
1962
|
module.exports = (input, options)=>{
|
|
@@ -1949,8 +2101,8 @@ __webpack_require__.add({
|
|
|
1949
2101
|
return state;
|
|
1950
2102
|
};
|
|
1951
2103
|
},
|
|
1952
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
1953
|
-
let path = __webpack_require__("path?aeb1"), win32 = 'win32' === process.platform, { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.
|
|
2104
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
2105
|
+
let path = __webpack_require__("path?aeb1"), win32 = 'win32' === process.platform, { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js");
|
|
1954
2106
|
exports.isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val), exports.hasRegexChars = (str)=>REGEX_SPECIAL_CHARS.test(str), exports.isRegexChar = (str)=>1 === str.length && exports.hasRegexChars(str), exports.escapeRegex = (str)=>str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'), exports.toPosixSlashes = (str)=>str.replace(REGEX_BACKSLASH, '/'), exports.removeBackslashes = (str)=>str.replace(REGEX_REMOVE_BACKSLASH, (match)=>'\\' === match ? '' : match), exports.supportsLookbehinds = ()=>{
|
|
1955
2107
|
let segs = process.version.slice(1).split('.').map(Number);
|
|
1956
2108
|
return 3 === segs.length && !!(segs[0] >= 9) || 8 === segs[0] && !!(segs[1] >= 10);
|
|
@@ -2911,9 +3063,9 @@ class HttpProxyMiddleware {
|
|
|
2911
3063
|
}
|
|
2912
3064
|
};
|
|
2913
3065
|
}
|
|
2914
|
-
function
|
|
3066
|
+
function createProxyMiddleware(options) {
|
|
2915
3067
|
let { middleware } = new HttpProxyMiddleware(options);
|
|
2916
3068
|
return middleware;
|
|
2917
3069
|
}
|
|
2918
3070
|
Debug.extend('response-interceptor');
|
|
2919
|
-
export {
|
|
3071
|
+
export { createProxyMiddleware };
|
package/dist/manifest-plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __webpack_require__ } from "./1~rslib-runtime.js";
|
|
2
2
|
import "./753.js";
|
|
3
3
|
__webpack_require__.add({
|
|
4
|
-
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
4
|
+
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.2/node_modules/rspack-manifest-plugin/dist/helpers.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
5
5
|
exports.transformFiles = exports.reduceChunk = exports.reduceAssets = exports.generateManifest = void 0;
|
|
6
6
|
let node_path_1 = __webpack_require__("node:path?435f");
|
|
7
7
|
exports.generateManifest = (compilation, files, { generate, seed = {} })=>generate ? generate(seed, files, Array.from(compilation.entrypoints.entries()).reduce((e, [name, entrypoint])=>Object.assign(e, {
|
|
@@ -61,9 +61,9 @@ __webpack_require__.add({
|
|
|
61
61
|
'sort'
|
|
62
62
|
].filter((fname)=>!!options[fname]).reduce((prev, fname)=>prev[fname](options[fname]), files).map(standardizeFilePaths);
|
|
63
63
|
},
|
|
64
|
-
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
64
|
+
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.2/node_modules/rspack-manifest-plugin/dist/hooks.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
65
65
|
exports.getCompilerHooks = exports.emitHook = exports.beforeRunHook = void 0;
|
|
66
|
-
let node_fs_1 = __webpack_require__("node:fs?9592"), node_path_1 = __webpack_require__("node:path?435f"), lite_tapable_1 = __webpack_require__("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.0/node_modules/@rspack/lite-tapable/dist/index.cjs"), helpers_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
66
|
+
let node_fs_1 = __webpack_require__("node:fs?9592"), node_path_1 = __webpack_require__("node:path?435f"), lite_tapable_1 = __webpack_require__("../../node_modules/.pnpm/@rspack+lite-tapable@1.1.0/node_modules/@rspack/lite-tapable/dist/index.cjs"), helpers_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.2/node_modules/rspack-manifest-plugin/dist/helpers.js"), compilerHookMap = new WeakMap(), getCompilerHooks = (compiler)=>{
|
|
67
67
|
let hooks = compilerHookMap.get(compiler);
|
|
68
68
|
return void 0 === hooks && (hooks = {
|
|
69
69
|
afterEmit: new lite_tapable_1.SyncWaterfallHook([
|
|
@@ -112,9 +112,9 @@ __webpack_require__.add({
|
|
|
112
112
|
getCompilerHooks(compiler).afterEmit.call(manifest);
|
|
113
113
|
};
|
|
114
114
|
},
|
|
115
|
-
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
115
|
+
"../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.2/node_modules/rspack-manifest-plugin/dist/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
116
116
|
exports.RspackManifestPlugin = void 0;
|
|
117
|
-
let node_path_1 = __webpack_require__("node:path?435f"), hooks_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
117
|
+
let node_path_1 = __webpack_require__("node:path?435f"), hooks_1 = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.2/node_modules/rspack-manifest-plugin/dist/hooks.js"), emitCountMap = new Map(), defaults = {
|
|
118
118
|
assetHookStage: 1 / 0,
|
|
119
119
|
basePath: '',
|
|
120
120
|
fileName: 'manifest.json',
|
|
@@ -683,5 +683,5 @@ __webpack_require__.add({
|
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
685
|
});
|
|
686
|
-
var RspackManifestPlugin = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.
|
|
686
|
+
var RspackManifestPlugin = __webpack_require__("../../node_modules/.pnpm/rspack-manifest-plugin@5.2.1_@rspack+core@2.0.2/node_modules/rspack-manifest-plugin/dist/index.js").RspackManifestPlugin;
|
|
687
687
|
export { RspackManifestPlugin };
|
package/dist/memfs.js
CHANGED
|
@@ -616,7 +616,7 @@ __webpack_require__.add({
|
|
|
616
616
|
Object.defineProperty(exports, "__esModule", {
|
|
617
617
|
value: !0
|
|
618
618
|
}), exports.Link = void 0;
|
|
619
|
-
let fs_node_utils_1 = __webpack_require__("../../node_modules/.pnpm/@jsonjoy.com+fs-node-utils@4.57.2_tslib@2.8.1/node_modules/@jsonjoy.com/fs-node-utils/lib/index.js"), fanout_1 = __webpack_require__("../../node_modules/.pnpm/thingies@2.
|
|
619
|
+
let fs_node_utils_1 = __webpack_require__("../../node_modules/.pnpm/@jsonjoy.com+fs-node-utils@4.57.2_tslib@2.8.1/node_modules/@jsonjoy.com/fs-node-utils/lib/index.js"), fanout_1 = __webpack_require__("../../node_modules/.pnpm/thingies@2.6.0_tslib@2.8.1/node_modules/thingies/lib/fanout.js"), { S_IFREG } = fs_node_utils_1.constants;
|
|
620
620
|
class Link {
|
|
621
621
|
get steps() {
|
|
622
622
|
return this._steps;
|
|
@@ -684,7 +684,7 @@ __webpack_require__.add({
|
|
|
684
684
|
Object.defineProperty(exports, "__esModule", {
|
|
685
685
|
value: !0
|
|
686
686
|
}), exports.Node = void 0;
|
|
687
|
-
let fanout_1 = __webpack_require__("../../node_modules/.pnpm/thingies@2.
|
|
687
|
+
let fanout_1 = __webpack_require__("../../node_modules/.pnpm/thingies@2.6.0_tslib@2.8.1/node_modules/thingies/lib/fanout.js"), process_1 = __webpack_require__("../../node_modules/.pnpm/@jsonjoy.com+fs-core@4.57.2_tslib@2.8.1/node_modules/@jsonjoy.com/fs-core/lib/process.js"), buffer_1 = __webpack_require__("../../node_modules/.pnpm/@jsonjoy.com+fs-node-builtins@4.57.2_tslib@2.8.1/node_modules/@jsonjoy.com/fs-node-builtins/lib/internal/buffer.js"), { S_IFMT, S_IFDIR, S_IFREG, S_IFLNK, S_IFCHR } = __webpack_require__("../../node_modules/.pnpm/@jsonjoy.com+fs-node-utils@4.57.2_tslib@2.8.1/node_modules/@jsonjoy.com/fs-node-utils/lib/index.js").constants, getuid = ()=>process_1.default.getuid?.() ?? 0, getgid = ()=>process_1.default.getgid?.() ?? 0, EMPTY_BUFFER = (0, buffer_1.bufferAllocUnsafe)(0);
|
|
688
688
|
exports.Node = class {
|
|
689
689
|
constructor(ino, mode = 438, uid = getuid(), gid = getgid()){
|
|
690
690
|
this.changes = new fanout_1.FanOut(), this._uid = getuid(), this._gid = getgid(), this._atime = new Date(), this._mtime = new Date(), this._ctime = new Date(), this.buf = EMPTY_BUFFER, this.capacity = 0, this.size = 0, this.rdev = 0, this._nlink = 1, this.mode = mode, this.ino = ino, this._uid = uid, this._gid = gid;
|
|
@@ -5442,7 +5442,7 @@ __webpack_require__.add({
|
|
|
5442
5442
|
...exports.fs
|
|
5443
5443
|
}, module.exports.semantic = !0;
|
|
5444
5444
|
},
|
|
5445
|
-
"../../node_modules/.pnpm/thingies@2.
|
|
5445
|
+
"../../node_modules/.pnpm/thingies@2.6.0_tslib@2.8.1/node_modules/thingies/lib/fanout.js" (__unused_rspack_module, exports) {
|
|
5446
5446
|
exports.FanOut = void 0, exports.FanOut = class {
|
|
5447
5447
|
constructor(){
|
|
5448
5448
|
this.listeners = new Set();
|
|
@@ -40,6 +40,11 @@ export declare const RAW_QUERY_REGEX: RegExp;
|
|
|
40
40
|
* Matches patterns like: `?inline`, `?inline&other=value`, `?other=value&inline`, `?inline=value`
|
|
41
41
|
*/
|
|
42
42
|
export declare const INLINE_QUERY_REGEX: RegExp;
|
|
43
|
+
/**
|
|
44
|
+
* Regular expression to match the 'url' query parameter.
|
|
45
|
+
* Matches patterns like: `?url`, `?url&other=value`, `?other=value&url`, `?url=value`
|
|
46
|
+
*/
|
|
47
|
+
export declare const URL_QUERY_REGEX: RegExp;
|
|
43
48
|
export declare const NODE_MODULES_REGEX: RegExp;
|
|
44
49
|
export declare const PLUGIN_SWC_NAME = "rsbuild:swc";
|
|
45
50
|
export declare const PLUGIN_CSS_NAME = "rsbuild:css";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -20,4 +20,4 @@ export { mergeRsbuildConfig } from './mergeConfig';
|
|
|
20
20
|
export type { RsbuildDevServer } from './server/devServer';
|
|
21
21
|
export type { RsbuildServerBase, ServerStartResult, StartDevServerResult, StartPreviewServerResult, } from './server/helper';
|
|
22
22
|
export type { RsbuildPreviewServer } from './server/previewServer';
|
|
23
|
-
export type { AliasStrategy, AppIcon, AppIconItem, Build, BuildOptions, BuildResult, Charset, CleanDistPath, CleanDistPathObject, ClientConfig, CliShortcut, CompressOptions, ConfigChain, ConfigChainWithContext, Connect, ConsoleType, CreateCompiler, CreateRsbuildOptions, CrossOrigin, CSSLoaderOptions, CSSModules, CSSModulesLocalsConvention, DataUriLimit, Decorators, DevConfig, DistPathConfig, EnvironmentConfig, EnvironmentContext, FilenameConfig, HistoryApiFallbackContext, HistoryApiFallbackOptions, HtmlBasicTag, HtmlConfig, HtmlFallback, HtmlRspackPlugin, HtmlTag, HtmlTagContext, HtmlTagDescriptor, HtmlTagHandler, InitConfigsOptions, InlineChunkConfig, InlineChunkTest, InlineChunkTestFunction, InspectConfigOptions, InspectConfigResult, InternalContext, LegalComments, LogLevel, ManifestConfig, ManifestData, ManifestObjectConfig, MergedEnvironmentConfig, MetaAttrs, MetaOptions, Minify, ModifyBundlerChainFn, ModifyBundlerChainUtils, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyEnvironmentConfigUtils, ModifyHTMLContext, ModifyHTMLFn, ModifyHTMLTagsContext, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, ModifyRsbuildConfigUtils, ModifyRspackConfigFn, ModifyRspackConfigUtils, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedEnvironmentConfig, NormalizedHtmlConfig, NormalizedModuleFederationConfig, NormalizedOutputConfig, NormalizedPerformanceConfig, NormalizedResolveConfig, NormalizedSecurityConfig, NormalizedServerConfig, NormalizedSourceConfig, NormalizedSplitChunksConfig, NormalizedToolsConfig, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterDevCompileFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartPreviewServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeDevCompileFn, OnBeforeEnvironmentCompileFn, OnBeforeStartDevServerFn, OnBeforeStartPreviewServerFn, OnCloseBuildFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, OutputConfig, OverlayOptions, OutputStructure, PerformanceConfig, PluginManager, Polyfill, PostCSSLoaderOptions, PostCSSOptions, PostCSSPlugin, PreconnectOption, PreviewOptions, PrintUrls, ProcessAssetsDescriptor, ProcessAssetsHandler, ProcessAssetsHook, ProgressBarConfig, ProxyBypass, ProxyConfig, ProxyFilter, ProxyOptions, PublicDir, PublicDirOptions, RequestHandler, ResolveConfig, ResolvedCreateRsbuildOptions, ResolveHandler, ResolveHook, ResourceHintsIncludeType, RsbuildConfig, RsbuildContext, RsbuildEntry, RsbuildEntryDescription, RsbuildInstance, RsbuildMode, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, RsbuildTarget, RspackChain, RspackRule, ScriptInject, ScriptLoading, SecurityConfig, ServerConfig, SetupMiddlewaresContext, SetupMiddlewaresFn, SourceConfig, SourceMap, SourceMapExtract, SourceMapExtractOptions, SourceMapExtractTarget, SplitChunks, SplitChunksConfig, SplitChunksPreset, SriAlgorithm, SriOptions, StartDevServerOptions, StyleLoaderOptions, ToolsConfig, TransformContext, TransformDescriptor, TransformHandler, TransformHook, TransformImport, WatchFiles, } from './types';
|
|
23
|
+
export type { AliasStrategy, AppIcon, AppIconItem, Build, BuildOptions, BuildResult, Charset, CleanDistPath, CleanDistPathObject, ClientConfig, CliShortcut, CompressOptions, ConfigChain, ConfigChainWithContext, Connect, ConsoleType, CreateCompiler, CreateRsbuildOptions, CrossOrigin, CSSLoaderOptions, CSSModules, CSSModulesLocalsConvention, DataUriLimit, Decorators, DevConfig, DistPathConfig, EnvironmentConfig, EnvironmentContext, FilenameConfig, FilenameHash, HistoryApiFallbackContext, HistoryApiFallbackOptions, HtmlBasicTag, HtmlConfig, HtmlFallback, HtmlRspackPlugin, HtmlTag, HtmlTagContext, HtmlTagDescriptor, HtmlTagHandler, InitConfigsOptions, InlineChunkConfig, InlineChunkTest, InlineChunkTestFunction, InspectConfigOptions, InspectConfigResult, InternalContext, LegalComments, LogLevel, ManifestConfig, ManifestData, ManifestObjectConfig, MergedEnvironmentConfig, MetaAttrs, MetaOptions, Minify, ModifyBundlerChainFn, ModifyBundlerChainUtils, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyEnvironmentConfigUtils, ModifyHTMLContext, ModifyHTMLFn, ModifyHTMLTagsContext, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, ModifyRsbuildConfigUtils, ModifyRspackConfigFn, ModifyRspackConfigUtils, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedEnvironmentConfig, NormalizedHtmlConfig, NormalizedModuleFederationConfig, NormalizedOutputConfig, NormalizedPerformanceConfig, NormalizedResolveConfig, NormalizedSecurityConfig, NormalizedServerConfig, NormalizedSourceConfig, NormalizedSplitChunksConfig, NormalizedToolsConfig, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterDevCompileFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartPreviewServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeDevCompileFn, OnBeforeEnvironmentCompileFn, OnBeforeStartDevServerFn, OnBeforeStartPreviewServerFn, OnCloseBuildFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn, OutputConfig, OverlayOptions, OutputStructure, PerformanceConfig, PluginManager, Polyfill, PostCSSLoaderOptions, PostCSSOptions, PostCSSPlugin, PreconnectOption, PreviewOptions, PrintUrls, ProcessAssetsDescriptor, ProcessAssetsHandler, ProcessAssetsHook, ProgressBarConfig, ProxyBypass, ProxyConfig, ProxyFilter, ProxyOptions, PublicDir, PublicDirOptions, RequestHandler, ResolveConfig, ResolvedCreateRsbuildOptions, ResolveHandler, ResolveHook, ResourceHintsIncludeType, RsbuildConfig, RsbuildContext, RsbuildEntry, RsbuildEntryDescription, RsbuildInstance, RsbuildMode, RsbuildPlugin, RsbuildPluginAPI, RsbuildPlugins, RsbuildTarget, RspackChain, RspackRule, ScriptInject, ScriptLoading, SecurityConfig, ServerConfig, SetupMiddlewaresContext, SetupMiddlewaresFn, SourceConfig, SourceMap, SourceMapExtract, SourceMapExtractOptions, SourceMapExtractTarget, SplitChunks, SplitChunksConfig, SplitChunksPreset, SriAlgorithm, SriOptions, StartDevServerOptions, StyleLoaderOptions, ToolsConfig, TransformContext, TransformDescriptor, TransformHandler, TransformHook, TransformImport, WatchFiles, } from './types';
|
|
@@ -857,6 +857,21 @@ export type FilenameConfig = {
|
|
|
857
857
|
*/
|
|
858
858
|
assets?: Rspack.AssetModuleFilename;
|
|
859
859
|
};
|
|
860
|
+
export type FilenameHash = boolean | string | {
|
|
861
|
+
/**
|
|
862
|
+
* Controls whether to add filename hash.
|
|
863
|
+
* - `true`: JavaScript and CSS filenames include hash in production mode.
|
|
864
|
+
* - `false`: Disable filename hash.
|
|
865
|
+
* - `'always'`: JavaScript and CSS filenames include hash in all modes.
|
|
866
|
+
* @default true
|
|
867
|
+
*/
|
|
868
|
+
enable?: boolean | 'always';
|
|
869
|
+
/**
|
|
870
|
+
* The filename hash format.
|
|
871
|
+
* @default 'contenthash:10'
|
|
872
|
+
*/
|
|
873
|
+
format?: string;
|
|
874
|
+
};
|
|
860
875
|
export type DataUriLimit = {
|
|
861
876
|
/**
|
|
862
877
|
* The data URI limit of the SVG image.
|
|
@@ -1191,10 +1206,15 @@ export interface OutputConfig {
|
|
|
1191
1206
|
*/
|
|
1192
1207
|
sourceMap?: boolean | SourceMap;
|
|
1193
1208
|
/**
|
|
1194
|
-
* Whether to add filename hash
|
|
1209
|
+
* Whether to add filename hash.
|
|
1210
|
+
* - `true`: JavaScript and CSS filenames include hash in production mode, while other assets
|
|
1211
|
+
* always include hash in all modes.
|
|
1212
|
+
* - `false`: Disable filename hash.
|
|
1213
|
+
* - `string`: Enable filename hash and customize the hash format, such as `'contenthash:16'`.
|
|
1214
|
+
* - `object`: An object to configure filename hash behavior.
|
|
1195
1215
|
* @default true
|
|
1196
1216
|
*/
|
|
1197
|
-
filenameHash?:
|
|
1217
|
+
filenameHash?: FilenameHash;
|
|
1198
1218
|
/**
|
|
1199
1219
|
* Whether to inline output scripts files (.js files) into HTML with `<script>` tags.
|
|
1200
1220
|
* @default false
|
|
@@ -1249,7 +1269,7 @@ export interface NormalizedOutputConfig extends OutputConfig {
|
|
|
1249
1269
|
extract: SourceMapExtract;
|
|
1250
1270
|
};
|
|
1251
1271
|
cleanDistPath: CleanDistPath;
|
|
1252
|
-
filenameHash:
|
|
1272
|
+
filenameHash: FilenameHash;
|
|
1253
1273
|
assetPrefix: string;
|
|
1254
1274
|
dataUriLimit: number | NormalizedDataUriLimit;
|
|
1255
1275
|
manifest: ManifestConfig;
|
|
@@ -1593,10 +1613,12 @@ export type OverlayOptions = {
|
|
|
1593
1613
|
*/
|
|
1594
1614
|
errors?: boolean | ((error: Error) => boolean);
|
|
1595
1615
|
/**
|
|
1596
|
-
* Whether to show runtime errors in the overlay.
|
|
1616
|
+
* Whether to show runtime errors in the overlay. You can pass a filter
|
|
1617
|
+
* function to control which runtime errors are rendered.
|
|
1618
|
+
* Return false from the filter function to hide a specific error.
|
|
1597
1619
|
* @default false
|
|
1598
1620
|
*/
|
|
1599
|
-
runtime?: boolean;
|
|
1621
|
+
runtime?: boolean | ((error: Error) => boolean);
|
|
1600
1622
|
};
|
|
1601
1623
|
export type ClientConfig = {
|
|
1602
1624
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"types.d.ts"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@rspack/core": "~2.0.
|
|
39
|
+
"@rspack/core": "~2.0.2",
|
|
40
40
|
"@swc/helpers": "^0.5.21"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"deepmerge": "^4.3.1",
|
|
66
66
|
"dotenv-expand": "13.0.0",
|
|
67
67
|
"html-rspack-plugin": "6.1.8",
|
|
68
|
-
"http-proxy-middleware": "4.0.0-beta.
|
|
69
|
-
"jiti": "^2.
|
|
68
|
+
"http-proxy-middleware": "4.0.0-beta.6",
|
|
69
|
+
"jiti": "^2.7.0",
|
|
70
70
|
"launch-editor-middleware": "^2.13.2",
|
|
71
71
|
"memfs": "^4.57.2",
|
|
72
72
|
"mrmime": "^2.0.1",
|
|
73
73
|
"on-finished": "2.4.1",
|
|
74
74
|
"open": "^11.0.0",
|
|
75
|
-
"postcss": "^8.5.
|
|
75
|
+
"postcss": "^8.5.13",
|
|
76
76
|
"postcss-load-config": "6.0.1",
|
|
77
77
|
"postcss-loader": "8.2.1",
|
|
78
78
|
"prebundle": "1.6.4",
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
"rslog": "^2.1.1",
|
|
82
82
|
"rspack-chain": "^2.0.1",
|
|
83
83
|
"rspack-manifest-plugin": "5.2.1",
|
|
84
|
+
"rspack-merge": "0.1.1",
|
|
84
85
|
"sirv": "^3.0.2",
|
|
85
86
|
"stacktrace-parser": "^0.1.11",
|
|
86
87
|
"style-loader": "^4.0.0",
|
|
87
88
|
"supports-color": "^10.2.2",
|
|
88
89
|
"tinyglobby": "^0.2.16",
|
|
89
90
|
"typescript": "^6.0.3",
|
|
90
|
-
"webpack-merge": "6.0.1",
|
|
91
91
|
"ws": "^8.20.0"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare function mergeUnique(key: string, uniques: string[], getter: (a: object) => string): (a: [], b: [], k: string) => false | any[];
|
|
2
|
-
|
|
3
|
-
type Key = string;
|
|
4
|
-
type Customize = (a: any, b: any, key: Key) => any;
|
|
5
|
-
interface ICustomizeOptions {
|
|
6
|
-
customizeArray?: Customize;
|
|
7
|
-
customizeObject?: Customize;
|
|
8
|
-
}
|
|
9
|
-
declare enum CustomizeRule {
|
|
10
|
-
Match = "match",
|
|
11
|
-
Merge = "merge",
|
|
12
|
-
Append = "append",
|
|
13
|
-
Prepend = "prepend",
|
|
14
|
-
Replace = "replace"
|
|
15
|
-
}
|
|
16
|
-
type CustomizeRuleString = "match" | "merge" | "append" | "prepend" | "replace";
|
|
17
|
-
|
|
18
|
-
declare function merge<Configuration extends object>(firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]): Configuration;
|
|
19
|
-
declare function mergeWithCustomize<Configuration extends object>(options: ICustomizeOptions): (firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]) => Configuration;
|
|
20
|
-
declare function customizeArray(rules: {
|
|
21
|
-
[s: string]: CustomizeRule | CustomizeRuleString;
|
|
22
|
-
}): (a: any, b: any, key: Key) => any;
|
|
23
|
-
type Rules = {
|
|
24
|
-
[s: string]: CustomizeRule | CustomizeRuleString | Rules;
|
|
25
|
-
};
|
|
26
|
-
declare function mergeWithRules(rules: Rules): (firstConfiguration: object | object[], ...configurations: object[]) => object;
|
|
27
|
-
declare function customizeObject(rules: {
|
|
28
|
-
[s: string]: CustomizeRule | CustomizeRuleString;
|
|
29
|
-
}): (a: any, b: any, key: Key) => any;
|
|
30
|
-
|
|
31
|
-
export { CustomizeRule, customizeArray, customizeObject, merge as default, merge, mergeWithCustomize, mergeWithRules, mergeUnique as unique };
|