@rsbuild/core 1.1.2 → 1.1.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/bin/rsbuild.js +2 -10
- package/compiled/css-loader/index.js +46 -46
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss/index.js +135 -117
- package/compiled/postcss/package.json +1 -1
- package/compiled/postcss-load-config/index.js +10 -10
- package/compiled/postcss-loader/index.js +11 -11
- package/compiled/rspack-chain/index.d.ts +3 -0
- package/compiled/rspack-chain/index.js +69 -66
- package/compiled/rspack-chain/package.json +1 -1
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/client/hmr.js +10 -1
- package/dist/index.cjs +459 -507
- package/dist/index.js +362 -412
- package/dist-types/cli/commands.d.ts +1 -1
- package/dist-types/cli/index.d.ts +1 -0
- package/dist-types/config.d.ts +29 -3
- package/dist-types/helpers/stats.d.ts +2 -3
- package/dist-types/index.d.ts +2 -1
- package/dist-types/internal.d.ts +0 -2
- package/package.json +6 -8
- package/dist/index.cjs.LICENSE.txt +0 -13
- package/dist/index.js.LICENSE.txt +0 -13
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
};
|
|
628
628
|
exports.toString = toString;
|
|
629
629
|
},
|
|
630
|
-
|
|
630
|
+
430: (module) => {
|
|
631
631
|
module.exports = class extends Function {
|
|
632
632
|
constructor() {
|
|
633
633
|
super();
|
|
@@ -640,35 +640,35 @@
|
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
642
|
},
|
|
643
|
-
|
|
644
|
-
const createMap = __nccwpck_require__(
|
|
645
|
-
const createChainable = __nccwpck_require__(
|
|
643
|
+
115: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
644
|
+
const createMap = __nccwpck_require__(944);
|
|
645
|
+
const createChainable = __nccwpck_require__(870);
|
|
646
646
|
module.exports = createMap(createChainable(Object));
|
|
647
647
|
},
|
|
648
|
-
|
|
649
|
-
const createSet = __nccwpck_require__(
|
|
650
|
-
const createChainable = __nccwpck_require__(
|
|
648
|
+
207: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
649
|
+
const createSet = __nccwpck_require__(72);
|
|
650
|
+
const createChainable = __nccwpck_require__(870);
|
|
651
651
|
module.exports = createSet(createChainable(Object));
|
|
652
652
|
},
|
|
653
|
-
|
|
654
|
-
const Callable = __nccwpck_require__(
|
|
655
|
-
const createMap = __nccwpck_require__(
|
|
656
|
-
const createChainable = __nccwpck_require__(
|
|
657
|
-
const createValue = __nccwpck_require__(
|
|
653
|
+
96: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
654
|
+
const Callable = __nccwpck_require__(430);
|
|
655
|
+
const createMap = __nccwpck_require__(944);
|
|
656
|
+
const createChainable = __nccwpck_require__(870);
|
|
657
|
+
const createValue = __nccwpck_require__(499);
|
|
658
658
|
module.exports = createValue(createMap(createChainable(Callable)));
|
|
659
659
|
},
|
|
660
|
-
|
|
661
|
-
const ChainedMap = __nccwpck_require__(
|
|
662
|
-
const ChainedValueMap = __nccwpck_require__(
|
|
663
|
-
const ChainedSet = __nccwpck_require__(
|
|
664
|
-
const Resolve = __nccwpck_require__(
|
|
665
|
-
const ResolveLoader = __nccwpck_require__(
|
|
666
|
-
const Output = __nccwpck_require__(
|
|
667
|
-
const DevServer = __nccwpck_require__(
|
|
668
|
-
const Plugin = __nccwpck_require__(
|
|
669
|
-
const Module = __nccwpck_require__(
|
|
670
|
-
const Optimization = __nccwpck_require__(
|
|
671
|
-
const Performance = __nccwpck_require__(
|
|
660
|
+
160: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
661
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
662
|
+
const ChainedValueMap = __nccwpck_require__(96);
|
|
663
|
+
const ChainedSet = __nccwpck_require__(207);
|
|
664
|
+
const Resolve = __nccwpck_require__(171);
|
|
665
|
+
const ResolveLoader = __nccwpck_require__(817);
|
|
666
|
+
const Output = __nccwpck_require__(497);
|
|
667
|
+
const DevServer = __nccwpck_require__(551);
|
|
668
|
+
const Plugin = __nccwpck_require__(891);
|
|
669
|
+
const Module = __nccwpck_require__(23);
|
|
670
|
+
const Optimization = __nccwpck_require__(780);
|
|
671
|
+
const Performance = __nccwpck_require__(480);
|
|
672
672
|
module.exports = class extends ChainedMap {
|
|
673
673
|
constructor() {
|
|
674
674
|
super();
|
|
@@ -818,9 +818,9 @@
|
|
|
818
818
|
}
|
|
819
819
|
};
|
|
820
820
|
},
|
|
821
|
-
|
|
822
|
-
const ChainedMap = __nccwpck_require__(
|
|
823
|
-
const ChainedSet = __nccwpck_require__(
|
|
821
|
+
551: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
822
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
823
|
+
const ChainedSet = __nccwpck_require__(207);
|
|
824
824
|
module.exports = class extends ChainedMap {
|
|
825
825
|
constructor(parent) {
|
|
826
826
|
super(parent);
|
|
@@ -892,9 +892,9 @@
|
|
|
892
892
|
}
|
|
893
893
|
};
|
|
894
894
|
},
|
|
895
|
-
|
|
896
|
-
const ChainedMap = __nccwpck_require__(
|
|
897
|
-
const Rule = __nccwpck_require__(
|
|
895
|
+
23: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
896
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
897
|
+
const Rule = __nccwpck_require__(75);
|
|
898
898
|
module.exports = class extends ChainedMap {
|
|
899
899
|
constructor(parent) {
|
|
900
900
|
super(parent);
|
|
@@ -949,10 +949,10 @@
|
|
|
949
949
|
}
|
|
950
950
|
};
|
|
951
951
|
},
|
|
952
|
-
|
|
953
|
-
const ChainedMap = __nccwpck_require__(
|
|
954
|
-
const ChainedValueMap = __nccwpck_require__(
|
|
955
|
-
const Plugin = __nccwpck_require__(
|
|
952
|
+
780: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
953
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
954
|
+
const ChainedValueMap = __nccwpck_require__(96);
|
|
955
|
+
const Plugin = __nccwpck_require__(891);
|
|
956
956
|
module.exports = class extends ChainedMap {
|
|
957
957
|
constructor(parent) {
|
|
958
958
|
super(parent);
|
|
@@ -1013,7 +1013,7 @@
|
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
1015
|
},
|
|
1016
|
-
|
|
1016
|
+
134: (module) => {
|
|
1017
1017
|
module.exports = (Class) =>
|
|
1018
1018
|
class extends Class {
|
|
1019
1019
|
before(name) {
|
|
@@ -1045,8 +1045,8 @@
|
|
|
1045
1045
|
}
|
|
1046
1046
|
};
|
|
1047
1047
|
},
|
|
1048
|
-
|
|
1049
|
-
const ChainedMap = __nccwpck_require__(
|
|
1048
|
+
497: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1049
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
1050
1050
|
module.exports = class extends ChainedMap {
|
|
1051
1051
|
constructor(parent) {
|
|
1052
1052
|
super(parent);
|
|
@@ -1100,8 +1100,8 @@
|
|
|
1100
1100
|
}
|
|
1101
1101
|
};
|
|
1102
1102
|
},
|
|
1103
|
-
|
|
1104
|
-
const ChainedValueMap = __nccwpck_require__(
|
|
1103
|
+
480: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1104
|
+
const ChainedValueMap = __nccwpck_require__(96);
|
|
1105
1105
|
module.exports = class extends ChainedValueMap {
|
|
1106
1106
|
constructor(parent) {
|
|
1107
1107
|
super(parent);
|
|
@@ -1114,9 +1114,9 @@
|
|
|
1114
1114
|
}
|
|
1115
1115
|
};
|
|
1116
1116
|
},
|
|
1117
|
-
|
|
1118
|
-
const ChainedMap = __nccwpck_require__(
|
|
1119
|
-
const Orderable = __nccwpck_require__(
|
|
1117
|
+
891: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1118
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
1119
|
+
const Orderable = __nccwpck_require__(134);
|
|
1120
1120
|
module.exports = Orderable(
|
|
1121
1121
|
class extends ChainedMap {
|
|
1122
1122
|
constructor(parent, name, type = "plugin") {
|
|
@@ -1170,7 +1170,7 @@
|
|
|
1170
1170
|
}
|
|
1171
1171
|
if (typeof plugin === "string") {
|
|
1172
1172
|
pluginPath = plugin;
|
|
1173
|
-
plugin = __nccwpck_require__(
|
|
1173
|
+
plugin = __nccwpck_require__(183)(pluginPath);
|
|
1174
1174
|
}
|
|
1175
1175
|
const constructorName = plugin.__expression
|
|
1176
1176
|
? `(${plugin.__expression})`
|
|
@@ -1188,10 +1188,10 @@
|
|
|
1188
1188
|
},
|
|
1189
1189
|
);
|
|
1190
1190
|
},
|
|
1191
|
-
|
|
1192
|
-
const ChainedMap = __nccwpck_require__(
|
|
1193
|
-
const ChainedSet = __nccwpck_require__(
|
|
1194
|
-
const Plugin = __nccwpck_require__(
|
|
1191
|
+
171: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1192
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
1193
|
+
const ChainedSet = __nccwpck_require__(207);
|
|
1194
|
+
const Plugin = __nccwpck_require__(891);
|
|
1195
1195
|
const childMaps = ["alias", "fallback", "byDependency", "extensionAlias"];
|
|
1196
1196
|
const childSets = [
|
|
1197
1197
|
"aliasFields",
|
|
@@ -1270,9 +1270,9 @@
|
|
|
1270
1270
|
}
|
|
1271
1271
|
};
|
|
1272
1272
|
},
|
|
1273
|
-
|
|
1274
|
-
const Resolve = __nccwpck_require__(
|
|
1275
|
-
const ChainedSet = __nccwpck_require__(
|
|
1273
|
+
817: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1274
|
+
const Resolve = __nccwpck_require__(171);
|
|
1275
|
+
const ChainedSet = __nccwpck_require__(207);
|
|
1276
1276
|
module.exports = class extends Resolve {
|
|
1277
1277
|
constructor(parent) {
|
|
1278
1278
|
super(parent);
|
|
@@ -1299,12 +1299,12 @@
|
|
|
1299
1299
|
}
|
|
1300
1300
|
};
|
|
1301
1301
|
},
|
|
1302
|
-
|
|
1303
|
-
const ChainedMap = __nccwpck_require__(
|
|
1304
|
-
const ChainedSet = __nccwpck_require__(
|
|
1305
|
-
const Orderable = __nccwpck_require__(
|
|
1306
|
-
const Use = __nccwpck_require__(
|
|
1307
|
-
const Resolve = __nccwpck_require__(
|
|
1302
|
+
75: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1303
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
1304
|
+
const ChainedSet = __nccwpck_require__(207);
|
|
1305
|
+
const Orderable = __nccwpck_require__(134);
|
|
1306
|
+
const Use = __nccwpck_require__(420);
|
|
1307
|
+
const Resolve = __nccwpck_require__(171);
|
|
1308
1308
|
function toArray(arr) {
|
|
1309
1309
|
return Array.isArray(arr) ? arr : [arr];
|
|
1310
1310
|
}
|
|
@@ -1330,6 +1330,7 @@
|
|
|
1330
1330
|
this.resolve = new Resolve(this);
|
|
1331
1331
|
this.resolve.extend(["fullySpecified"]);
|
|
1332
1332
|
this.extend([
|
|
1333
|
+
"dependency",
|
|
1333
1334
|
"enforce",
|
|
1334
1335
|
"issuer",
|
|
1335
1336
|
"issuerLayer",
|
|
@@ -1338,8 +1339,10 @@
|
|
|
1338
1339
|
"parser",
|
|
1339
1340
|
"generator",
|
|
1340
1341
|
"resource",
|
|
1342
|
+
"resourceFragment",
|
|
1341
1343
|
"resourceQuery",
|
|
1342
1344
|
"sideEffects",
|
|
1345
|
+
"with",
|
|
1343
1346
|
"test",
|
|
1344
1347
|
"type",
|
|
1345
1348
|
]);
|
|
@@ -1429,10 +1432,10 @@
|
|
|
1429
1432
|
);
|
|
1430
1433
|
module.exports = Rule;
|
|
1431
1434
|
},
|
|
1432
|
-
|
|
1435
|
+
420: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1433
1436
|
const merge = __nccwpck_require__(964);
|
|
1434
|
-
const ChainedMap = __nccwpck_require__(
|
|
1435
|
-
const Orderable = __nccwpck_require__(
|
|
1437
|
+
const ChainedMap = __nccwpck_require__(115);
|
|
1438
|
+
const Orderable = __nccwpck_require__(134);
|
|
1436
1439
|
module.exports = Orderable(
|
|
1437
1440
|
class extends ChainedMap {
|
|
1438
1441
|
constructor(parent, name) {
|
|
@@ -1465,7 +1468,7 @@
|
|
|
1465
1468
|
},
|
|
1466
1469
|
);
|
|
1467
1470
|
},
|
|
1468
|
-
|
|
1471
|
+
870: (module) => {
|
|
1469
1472
|
module.exports = function createChainable(superClass) {
|
|
1470
1473
|
return class extends superClass {
|
|
1471
1474
|
constructor(parent) {
|
|
@@ -1482,7 +1485,7 @@
|
|
|
1482
1485
|
};
|
|
1483
1486
|
};
|
|
1484
1487
|
},
|
|
1485
|
-
|
|
1488
|
+
944: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
1486
1489
|
const merge = __nccwpck_require__(964);
|
|
1487
1490
|
module.exports = function createMap(superClass) {
|
|
1488
1491
|
return class extends superClass {
|
|
@@ -1606,7 +1609,7 @@
|
|
|
1606
1609
|
};
|
|
1607
1610
|
};
|
|
1608
1611
|
},
|
|
1609
|
-
|
|
1612
|
+
72: (module) => {
|
|
1610
1613
|
module.exports = function createSet(superClass) {
|
|
1611
1614
|
return class extends superClass {
|
|
1612
1615
|
constructor(...args) {
|
|
@@ -1656,7 +1659,7 @@
|
|
|
1656
1659
|
};
|
|
1657
1660
|
};
|
|
1658
1661
|
},
|
|
1659
|
-
|
|
1662
|
+
499: (module) => {
|
|
1660
1663
|
module.exports = function createValue(superClass) {
|
|
1661
1664
|
return class extends superClass {
|
|
1662
1665
|
constructor(...args) {
|
|
@@ -1694,7 +1697,7 @@
|
|
|
1694
1697
|
};
|
|
1695
1698
|
};
|
|
1696
1699
|
},
|
|
1697
|
-
|
|
1700
|
+
183: (module) => {
|
|
1698
1701
|
function webpackEmptyContext(req) {
|
|
1699
1702
|
var e = new Error("Cannot find module '" + req + "'");
|
|
1700
1703
|
e.code = "MODULE_NOT_FOUND";
|
|
@@ -1702,7 +1705,7 @@
|
|
|
1702
1705
|
}
|
|
1703
1706
|
webpackEmptyContext.keys = () => [];
|
|
1704
1707
|
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
1705
|
-
webpackEmptyContext.id =
|
|
1708
|
+
webpackEmptyContext.id = 183;
|
|
1706
1709
|
module.exports = webpackEmptyContext;
|
|
1707
1710
|
},
|
|
1708
1711
|
};
|
|
@@ -1732,6 +1735,6 @@
|
|
|
1732
1735
|
})();
|
|
1733
1736
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1734
1737
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1735
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1738
|
+
var __webpack_exports__ = __nccwpck_require__(160);
|
|
1736
1739
|
module.exports = __webpack_exports__;
|
|
1737
1740
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rspack-chain","author":"rspack-contrib","version":"1.0
|
|
1
|
+
{"name":"rspack-chain","author":"rspack-contrib","version":"1.1.0","license":"MPL-2.0","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
674: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.transformFiles =
|
|
7
7
|
exports.reduceChunk =
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
.map(standardizeFilePaths);
|
|
121
121
|
exports.transformFiles = transformFiles;
|
|
122
122
|
},
|
|
123
|
-
|
|
123
|
+
641: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
124
124
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
125
125
|
exports.normalModuleLoaderHook =
|
|
126
126
|
exports.getCompilerHooks =
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
const fs_1 = __nccwpck_require__(147);
|
|
131
131
|
const path_1 = __nccwpck_require__(17);
|
|
132
132
|
const lite_tapable_1 = __nccwpck_require__(348);
|
|
133
|
-
const helpers_1 = __nccwpck_require__(
|
|
133
|
+
const helpers_1 = __nccwpck_require__(674);
|
|
134
134
|
const compilerHookMap = new WeakMap();
|
|
135
135
|
const getCompilerHooks = (compiler) => {
|
|
136
136
|
let hooks = compilerHookMap.get(compiler);
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
exports.getCompilerHooks =
|
|
313
313
|
void 0;
|
|
314
314
|
const path_1 = __nccwpck_require__(17);
|
|
315
|
-
const hooks_1 = __nccwpck_require__(
|
|
315
|
+
const hooks_1 = __nccwpck_require__(641);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
package/dist/client/hmr.js
CHANGED
|
@@ -14,6 +14,14 @@ function resolveFileName(stats) {
|
|
|
14
14
|
const file = stats.file || stats.moduleName;
|
|
15
15
|
return file ? `File: ${file}\n` : '';
|
|
16
16
|
}
|
|
17
|
+
function resolveModuleTrace(stats) {
|
|
18
|
+
let traceStr = '';
|
|
19
|
+
if (stats.moduleTrace) {
|
|
20
|
+
for (const trace of stats.moduleTrace)if (trace.originName) // TODO: missing moduleTrace.dependencies[].loc in rspack
|
|
21
|
+
traceStr += `\n @ ${trace.originName}`;
|
|
22
|
+
}
|
|
23
|
+
return traceStr;
|
|
24
|
+
}
|
|
17
25
|
function hintUnknownFiles(message) {
|
|
18
26
|
const hint = 'You may need an appropriate loader to handle this file type.';
|
|
19
27
|
if (-1 === message.indexOf(hint)) return message;
|
|
@@ -32,7 +40,8 @@ function formatMessage(stats, verbose) {
|
|
|
32
40
|
const mainMessage = stats.message;
|
|
33
41
|
const details = verbose && stats.details ? `\nDetails: ${stats.details}\n` : '';
|
|
34
42
|
const stack = verbose && stats.stack ? `\n${stats.stack}` : '';
|
|
35
|
-
|
|
43
|
+
const moduleTrace = resolveModuleTrace(stats);
|
|
44
|
+
message = `${fileName}${mainMessage}${details}${stack}${moduleTrace}`;
|
|
36
45
|
} else message = stats;
|
|
37
46
|
message = hintUnknownFiles(message);
|
|
38
47
|
lines = message.split('\n');
|