@rsbuild/core 1.3.19 → 1.3.20
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 +23 -21
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rsbuild-dev-middleware/index.js +25 -25
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/compiled/style-loader/index.js +10 -10
- package/dist/index.cjs +15 -11
- package/dist/index.js +15 -11
- package/dist-types/server/devServer.d.ts +2 -2
- package/dist-types/types/config.d.ts +50 -4
- package/dist-types/types/plugin.d.ts +3 -3
- package/package.json +4 -4
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
1950: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(9844);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(2669).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
9844: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
11
11
|
"use strict";
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports["default"] = loader;
|
|
14
14
|
var _postcss = _interopRequireDefault(__nccwpck_require__(9409));
|
|
15
|
-
var _plugins = __nccwpck_require__(
|
|
16
|
-
var _utils = __nccwpck_require__(
|
|
15
|
+
var _plugins = __nccwpck_require__(5179);
|
|
16
|
+
var _utils = __nccwpck_require__(2669);
|
|
17
17
|
function _interopRequireDefault(obj) {
|
|
18
18
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
19
19
|
}
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
callback(null, `${importCode}${moduleCode}${exportCode}`);
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
|
|
239
|
+
5179: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
240
240
|
"use strict";
|
|
241
241
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
242
242
|
Object.defineProperty(exports, "icssParser", {
|
|
@@ -258,20 +258,22 @@
|
|
|
258
258
|
},
|
|
259
259
|
});
|
|
260
260
|
var _postcssImportParser = _interopRequireDefault(
|
|
261
|
-
__nccwpck_require__(
|
|
261
|
+
__nccwpck_require__(2720),
|
|
262
262
|
);
|
|
263
|
-
var _postcssIcssParser = _interopRequireDefault(
|
|
264
|
-
|
|
263
|
+
var _postcssIcssParser = _interopRequireDefault(
|
|
264
|
+
__nccwpck_require__(3045),
|
|
265
|
+
);
|
|
266
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(9380));
|
|
265
267
|
function _interopRequireDefault(obj) {
|
|
266
268
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
267
269
|
}
|
|
268
270
|
},
|
|
269
|
-
|
|
271
|
+
3045: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
270
272
|
"use strict";
|
|
271
273
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
272
274
|
exports["default"] = void 0;
|
|
273
275
|
var _icssUtils = __nccwpck_require__(4531);
|
|
274
|
-
var _utils = __nccwpck_require__(
|
|
276
|
+
var _utils = __nccwpck_require__(2669);
|
|
275
277
|
const plugin = (options = {}) => ({
|
|
276
278
|
postcssPlugin: "postcss-icss-parser",
|
|
277
279
|
async OnceExit(root) {
|
|
@@ -370,14 +372,14 @@
|
|
|
370
372
|
plugin.postcss = true;
|
|
371
373
|
var _default = (exports["default"] = plugin);
|
|
372
374
|
},
|
|
373
|
-
|
|
375
|
+
2720: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
374
376
|
"use strict";
|
|
375
377
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
376
378
|
exports["default"] = void 0;
|
|
377
379
|
var _postcssValueParser = _interopRequireDefault(
|
|
378
380
|
__nccwpck_require__(2948),
|
|
379
381
|
);
|
|
380
|
-
var _utils = __nccwpck_require__(
|
|
382
|
+
var _utils = __nccwpck_require__(2669);
|
|
381
383
|
function _interopRequireDefault(obj) {
|
|
382
384
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
383
385
|
}
|
|
@@ -682,14 +684,14 @@
|
|
|
682
684
|
plugin.postcss = true;
|
|
683
685
|
var _default = (exports["default"] = plugin);
|
|
684
686
|
},
|
|
685
|
-
|
|
687
|
+
9380: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
686
688
|
"use strict";
|
|
687
689
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
688
690
|
exports["default"] = void 0;
|
|
689
691
|
var _postcssValueParser = _interopRequireDefault(
|
|
690
692
|
__nccwpck_require__(2948),
|
|
691
693
|
);
|
|
692
|
-
var _utils = __nccwpck_require__(
|
|
694
|
+
var _utils = __nccwpck_require__(2669);
|
|
693
695
|
function _interopRequireDefault(obj) {
|
|
694
696
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
695
697
|
}
|
|
@@ -1032,7 +1034,7 @@
|
|
|
1032
1034
|
plugin.postcss = true;
|
|
1033
1035
|
var _default = (exports["default"] = plugin);
|
|
1034
1036
|
},
|
|
1035
|
-
|
|
1037
|
+
2669: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1036
1038
|
"use strict";
|
|
1037
1039
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1038
1040
|
exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
|
|
@@ -3731,7 +3733,7 @@
|
|
|
3731
3733
|
var _selector = _interopRequireDefault(__nccwpck_require__(5297));
|
|
3732
3734
|
var _className = _interopRequireDefault(__nccwpck_require__(173));
|
|
3733
3735
|
var _comment = _interopRequireDefault(__nccwpck_require__(8983));
|
|
3734
|
-
var _id = _interopRequireDefault(__nccwpck_require__(
|
|
3736
|
+
var _id = _interopRequireDefault(__nccwpck_require__(8453));
|
|
3735
3737
|
var _tag = _interopRequireDefault(__nccwpck_require__(5526));
|
|
3736
3738
|
var _string = _interopRequireDefault(__nccwpck_require__(4349));
|
|
3737
3739
|
var _pseudo = _interopRequireDefault(__nccwpck_require__(7250));
|
|
@@ -5707,7 +5709,7 @@
|
|
|
5707
5709
|
var _className = _interopRequireDefault(__nccwpck_require__(173));
|
|
5708
5710
|
var _combinator = _interopRequireDefault(__nccwpck_require__(3998));
|
|
5709
5711
|
var _comment = _interopRequireDefault(__nccwpck_require__(8983));
|
|
5710
|
-
var _id = _interopRequireDefault(__nccwpck_require__(
|
|
5712
|
+
var _id = _interopRequireDefault(__nccwpck_require__(8453));
|
|
5711
5713
|
var _nesting = _interopRequireDefault(__nccwpck_require__(8568));
|
|
5712
5714
|
var _pseudo = _interopRequireDefault(__nccwpck_require__(7250));
|
|
5713
5715
|
var _root = _interopRequireDefault(__nccwpck_require__(9608));
|
|
@@ -6289,7 +6291,7 @@
|
|
|
6289
6291
|
return isAttribute(node) || isTag(node);
|
|
6290
6292
|
}
|
|
6291
6293
|
},
|
|
6292
|
-
|
|
6294
|
+
8453: (module, exports, __nccwpck_require__) => {
|
|
6293
6295
|
"use strict";
|
|
6294
6296
|
exports.__esModule = true;
|
|
6295
6297
|
exports["default"] = void 0;
|
|
@@ -8096,6 +8098,6 @@
|
|
|
8096
8098
|
}
|
|
8097
8099
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8098
8100
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8099
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8101
|
+
var __webpack_exports__ = __nccwpck_require__(1950);
|
|
8100
8102
|
module.exports = __webpack_exports__;
|
|
8101
8103
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
808: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(325);
|
|
6
6
|
const compilerMap = new WeakMap();
|
|
7
7
|
class CachedChildCompilation {
|
|
8
8
|
constructor(compiler) {
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
}
|
|
312
312
|
module.exports = { CachedChildCompilation };
|
|
313
313
|
},
|
|
314
|
-
|
|
314
|
+
325: (module) => {
|
|
315
315
|
"use strict";
|
|
316
316
|
class HtmlWebpackChildCompiler {
|
|
317
317
|
constructor(templates) {
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
}
|
|
481
481
|
module.exports = { HtmlWebpackChildCompiler };
|
|
482
482
|
},
|
|
483
|
-
|
|
483
|
+
411: (module) => {
|
|
484
484
|
"use strict";
|
|
485
485
|
module.exports = {};
|
|
486
486
|
module.exports.none = (chunks) => chunks;
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
};
|
|
500
500
|
module.exports.auto = module.exports.none;
|
|
501
501
|
},
|
|
502
|
-
|
|
502
|
+
326: (module) => {
|
|
503
503
|
"use strict";
|
|
504
504
|
module.exports = function (err) {
|
|
505
505
|
return {
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
};
|
|
521
521
|
};
|
|
522
522
|
},
|
|
523
|
-
|
|
523
|
+
549: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
524
524
|
"use strict";
|
|
525
525
|
const { AsyncSeriesWaterfallHook } = __nccwpck_require__(408);
|
|
526
526
|
const htmlWebpackPluginHooksMap = new WeakMap();
|
|
@@ -546,7 +546,7 @@
|
|
|
546
546
|
}
|
|
547
547
|
module.exports = { getHtmlRspackPluginHooks };
|
|
548
548
|
},
|
|
549
|
-
|
|
549
|
+
628: (module) => {
|
|
550
550
|
const voidTags = [
|
|
551
551
|
"area",
|
|
552
552
|
"base",
|
|
@@ -614,19 +614,19 @@
|
|
|
614
614
|
htmlTagObjectToString,
|
|
615
615
|
};
|
|
616
616
|
},
|
|
617
|
-
|
|
617
|
+
385: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
618
618
|
"use strict";
|
|
619
619
|
const promisify = __nccwpck_require__(23).promisify;
|
|
620
620
|
const vm = __nccwpck_require__(154);
|
|
621
621
|
const fs = __nccwpck_require__(896);
|
|
622
622
|
const path = __nccwpck_require__(928);
|
|
623
|
-
const { CachedChildCompilation } = __nccwpck_require__(
|
|
623
|
+
const { CachedChildCompilation } = __nccwpck_require__(808);
|
|
624
624
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
625
|
-
__nccwpck_require__(
|
|
626
|
-
const prettyError = __nccwpck_require__(
|
|
627
|
-
const chunkSorter = __nccwpck_require__(
|
|
625
|
+
__nccwpck_require__(628);
|
|
626
|
+
const prettyError = __nccwpck_require__(326);
|
|
627
|
+
const chunkSorter = __nccwpck_require__(411);
|
|
628
628
|
const getHtmlRspackPluginHooks =
|
|
629
|
-
__nccwpck_require__(
|
|
629
|
+
__nccwpck_require__(549).getHtmlRspackPluginHooks;
|
|
630
630
|
const WITH_PLACEHOLDER = "function __with_placeholder__";
|
|
631
631
|
class HtmlRspackPlugin {
|
|
632
632
|
constructor(userOptions = {}) {
|
|
@@ -1597,6 +1597,6 @@
|
|
|
1597
1597
|
}
|
|
1598
1598
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
1599
1599
|
__nccwpck_require__.ab = __dirname + "/";
|
|
1600
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
1600
|
+
var __webpack_exports__ = __nccwpck_require__(385);
|
|
1601
1601
|
module.exports = __webpack_exports__;
|
|
1602
1602
|
})();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
217: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(187)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
187: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8
8
|
var __webpack_unused_export__;
|
|
9
9
|
__webpack_unused_export__ = { value: true };
|
|
10
10
|
exports["default"] = loader;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(422);
|
|
13
13
|
function _interopRequireDefault(obj) {
|
|
14
14
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
15
15
|
}
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
callback(null, result.css, map, { ast });
|
|
180
180
|
}
|
|
181
181
|
},
|
|
182
|
-
|
|
182
|
+
422: (module, exports, __nccwpck_require__) => {
|
|
183
183
|
module = __nccwpck_require__.nmd(module);
|
|
184
184
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
185
185
|
exports.exec = exec;
|
|
@@ -716,6 +716,6 @@
|
|
|
716
716
|
})();
|
|
717
717
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
718
718
|
__nccwpck_require__.ab = __dirname + "/";
|
|
719
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
719
|
+
var __webpack_exports__ = __nccwpck_require__(217);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -4449,15 +4449,15 @@
|
|
|
4449
4449
|
return a.start - b.start;
|
|
4450
4450
|
}
|
|
4451
4451
|
},
|
|
4452
|
-
|
|
4452
|
+
4276: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4453
4453
|
"use strict";
|
|
4454
4454
|
const { logger } = __nccwpck_require__(8679);
|
|
4455
|
-
const middleware = __nccwpck_require__(
|
|
4456
|
-
const getFilenameFromUrl = __nccwpck_require__(
|
|
4457
|
-
const setupHooks = __nccwpck_require__(
|
|
4458
|
-
const setupWriteToDisk = __nccwpck_require__(
|
|
4459
|
-
const setupOutputFileSystem = __nccwpck_require__(
|
|
4460
|
-
const ready = __nccwpck_require__(
|
|
4455
|
+
const middleware = __nccwpck_require__(2282);
|
|
4456
|
+
const getFilenameFromUrl = __nccwpck_require__(7934);
|
|
4457
|
+
const setupHooks = __nccwpck_require__(8547);
|
|
4458
|
+
const setupWriteToDisk = __nccwpck_require__(5140);
|
|
4459
|
+
const setupOutputFileSystem = __nccwpck_require__(7229);
|
|
4460
|
+
const ready = __nccwpck_require__(4241);
|
|
4461
4461
|
const noop = () => {};
|
|
4462
4462
|
function wdm(compiler, options = {}) {
|
|
4463
4463
|
const context = {
|
|
@@ -4514,15 +4514,15 @@
|
|
|
4514
4514
|
}
|
|
4515
4515
|
module.exports = wdm;
|
|
4516
4516
|
},
|
|
4517
|
-
|
|
4517
|
+
2282: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4518
4518
|
"use strict";
|
|
4519
4519
|
const mrmime = __nccwpck_require__(8311);
|
|
4520
4520
|
const { logger } = __nccwpck_require__(8679);
|
|
4521
4521
|
const onFinishedStream = __nccwpck_require__(21);
|
|
4522
|
-
const getFilenameFromUrl = __nccwpck_require__(
|
|
4523
|
-
const ready = __nccwpck_require__(
|
|
4524
|
-
const parseTokenList = __nccwpck_require__(
|
|
4525
|
-
const memorize = __nccwpck_require__(
|
|
4522
|
+
const getFilenameFromUrl = __nccwpck_require__(7934);
|
|
4523
|
+
const ready = __nccwpck_require__(4241);
|
|
4524
|
+
const parseTokenList = __nccwpck_require__(6100);
|
|
4525
|
+
const memorize = __nccwpck_require__(6858);
|
|
4526
4526
|
async function getEtag(stat) {
|
|
4527
4527
|
const mtime = stat.mtime.getTime().toString(16);
|
|
4528
4528
|
const size = stat.size.toString(16);
|
|
@@ -4614,7 +4614,7 @@
|
|
|
4614
4614
|
return;
|
|
4615
4615
|
}
|
|
4616
4616
|
function sendError(status, options) {
|
|
4617
|
-
const escapeHtml = __nccwpck_require__(
|
|
4617
|
+
const escapeHtml = __nccwpck_require__(2142);
|
|
4618
4618
|
const content = statuses[status] || String(status);
|
|
4619
4619
|
const document = Buffer.from(
|
|
4620
4620
|
`<!DOCTYPE html>\n<html lang="en">\n<head>\n<meta charset="utf-8">\n<title>Error</title>\n</head>\n<body>\n<pre>${escapeHtml(content)}</pre>\n</body>\n</html>`,
|
|
@@ -4923,7 +4923,7 @@
|
|
|
4923
4923
|
}
|
|
4924
4924
|
module.exports = wrapper;
|
|
4925
4925
|
},
|
|
4926
|
-
|
|
4926
|
+
2142: (module) => {
|
|
4927
4927
|
"use strict";
|
|
4928
4928
|
const matchHtmlRegExp = /["'&<>]/;
|
|
4929
4929
|
function escapeHtml(string) {
|
|
@@ -4968,13 +4968,13 @@
|
|
|
4968
4968
|
}
|
|
4969
4969
|
module.exports = escapeHtml;
|
|
4970
4970
|
},
|
|
4971
|
-
|
|
4971
|
+
7934: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4972
4972
|
"use strict";
|
|
4973
4973
|
const path = __nccwpck_require__(6928);
|
|
4974
4974
|
const { parse } = __nccwpck_require__(7016);
|
|
4975
4975
|
const querystring = __nccwpck_require__(3480);
|
|
4976
|
-
const getPaths = __nccwpck_require__(
|
|
4977
|
-
const memorize = __nccwpck_require__(
|
|
4976
|
+
const getPaths = __nccwpck_require__(792);
|
|
4977
|
+
const memorize = __nccwpck_require__(6858);
|
|
4978
4978
|
const memoizedParse = memorize(parse, undefined, (value) => {
|
|
4979
4979
|
if (value.pathname) {
|
|
4980
4980
|
value.pathname = decode(value.pathname);
|
|
@@ -5057,7 +5057,7 @@
|
|
|
5057
5057
|
}
|
|
5058
5058
|
module.exports = getFilenameFromUrl;
|
|
5059
5059
|
},
|
|
5060
|
-
|
|
5060
|
+
792: (module) => {
|
|
5061
5061
|
"use strict";
|
|
5062
5062
|
function getPaths(context) {
|
|
5063
5063
|
const { stats, options } = context;
|
|
@@ -5078,7 +5078,7 @@
|
|
|
5078
5078
|
}
|
|
5079
5079
|
module.exports = getPaths;
|
|
5080
5080
|
},
|
|
5081
|
-
|
|
5081
|
+
6858: (module) => {
|
|
5082
5082
|
"use strict";
|
|
5083
5083
|
const cacheStore = new WeakMap();
|
|
5084
5084
|
function memorize(fn, { cache = new Map() } = {}, callback) {
|
|
@@ -5100,7 +5100,7 @@
|
|
|
5100
5100
|
}
|
|
5101
5101
|
module.exports = memorize;
|
|
5102
5102
|
},
|
|
5103
|
-
|
|
5103
|
+
6100: (module) => {
|
|
5104
5104
|
"use strict";
|
|
5105
5105
|
function parseTokenList(str) {
|
|
5106
5106
|
let end = 0;
|
|
@@ -5133,7 +5133,7 @@
|
|
|
5133
5133
|
}
|
|
5134
5134
|
module.exports = parseTokenList;
|
|
5135
5135
|
},
|
|
5136
|
-
|
|
5136
|
+
4241: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5137
5137
|
"use strict";
|
|
5138
5138
|
const { logger } = __nccwpck_require__(8679);
|
|
5139
5139
|
function ready(context, callback, req) {
|
|
@@ -5149,7 +5149,7 @@
|
|
|
5149
5149
|
}
|
|
5150
5150
|
module.exports = ready;
|
|
5151
5151
|
},
|
|
5152
|
-
|
|
5152
|
+
8547: (module) => {
|
|
5153
5153
|
"use strict";
|
|
5154
5154
|
function setupHooks(context) {
|
|
5155
5155
|
function invalid() {
|
|
@@ -5177,7 +5177,7 @@
|
|
|
5177
5177
|
}
|
|
5178
5178
|
module.exports = setupHooks;
|
|
5179
5179
|
},
|
|
5180
|
-
|
|
5180
|
+
7229: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5181
5181
|
"use strict";
|
|
5182
5182
|
const memfs = __nccwpck_require__(5590);
|
|
5183
5183
|
function setupOutputFileSystem(context) {
|
|
@@ -5204,7 +5204,7 @@
|
|
|
5204
5204
|
}
|
|
5205
5205
|
module.exports = setupOutputFileSystem;
|
|
5206
5206
|
},
|
|
5207
|
-
|
|
5207
|
+
5140: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5208
5208
|
"use strict";
|
|
5209
5209
|
const fs = __nccwpck_require__(9896);
|
|
5210
5210
|
const path = __nccwpck_require__(6928);
|
|
@@ -6195,6 +6195,6 @@
|
|
|
6195
6195
|
}
|
|
6196
6196
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
6197
6197
|
__nccwpck_require__.ab = __dirname + "/";
|
|
6198
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
6198
|
+
var __webpack_exports__ = __nccwpck_require__(4276);
|
|
6199
6199
|
module.exports = __webpack_exports__;
|
|
6200
6200
|
})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
222: (__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
|
+
727: (__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__(896);
|
|
131
131
|
const path_1 = __nccwpck_require__(928);
|
|
132
132
|
const lite_tapable_1 = __nccwpck_require__(408);
|
|
133
|
-
const helpers_1 = __nccwpck_require__(
|
|
133
|
+
const helpers_1 = __nccwpck_require__(222);
|
|
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__(928);
|
|
315
|
-
const hooks_1 = __nccwpck_require__(
|
|
315
|
+
const hooks_1 = __nccwpck_require__(727);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
4
|
+
330: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
const loader = __nccwpck_require__(16);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
16: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports["default"] = void 0;
|
|
11
11
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
12
|
-
var _utils = __nccwpck_require__(
|
|
13
|
-
var _options = _interopRequireDefault(__nccwpck_require__(
|
|
12
|
+
var _utils = __nccwpck_require__(753);
|
|
13
|
+
var _options = _interopRequireDefault(__nccwpck_require__(185));
|
|
14
14
|
function _interopRequireDefault(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
16
16
|
}
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
};
|
|
105
105
|
var _default = (exports["default"] = loader);
|
|
106
106
|
},
|
|
107
|
-
|
|
107
|
+
483: (module) => {
|
|
108
108
|
function isEqualLocals(a, b, isNamedExport) {
|
|
109
109
|
if ((!a && b) || (a && !b)) {
|
|
110
110
|
return false;
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
}
|
|
131
131
|
module.exports = isEqualLocals;
|
|
132
132
|
},
|
|
133
|
-
|
|
133
|
+
753: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
134
134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
135
135
|
exports.getExportLazyStyleCode = getExportLazyStyleCode;
|
|
136
136
|
exports.getExportStyleCode = getExportStyleCode;
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
exports.getdomAPI = getdomAPI;
|
|
152
152
|
exports.stringifyRequest = stringifyRequest;
|
|
153
153
|
var _path = _interopRequireDefault(__nccwpck_require__(928));
|
|
154
|
-
var _isEqualLocals = _interopRequireDefault(__nccwpck_require__(
|
|
154
|
+
var _isEqualLocals = _interopRequireDefault(__nccwpck_require__(483));
|
|
155
155
|
function _interopRequireDefault(obj) {
|
|
156
156
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
157
157
|
}
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
928: (module) => {
|
|
395
395
|
module.exports = require("path");
|
|
396
396
|
},
|
|
397
|
-
|
|
397
|
+
185: (module) => {
|
|
398
398
|
module.exports = JSON.parse(
|
|
399
399
|
'{"title":"Style Loader options","type":"object","properties":{"injectType":{"description":"Allows to setup how styles will be injected into DOM.","link":"https://github.com/webpack-contrib/style-loader#injecttype","enum":["styleTag","singletonStyleTag","autoStyleTag","lazyStyleTag","lazySingletonStyleTag","lazyAutoStyleTag","linkTag"]},"attributes":{"description":"Adds custom attributes to tag.","link":"https://github.com/webpack-contrib/style-loader#attributes","type":"object"},"insert":{"description":"Inserts `<style>`/`<link>` at the given position.","link":"https://github.com/webpack-contrib/style-loader#insert","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"base":{"description":"Sets module ID base for DLLPlugin.","link":"https://github.com/webpack-contrib/style-loader#base","type":"number"},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"styleTagTransform":{"description":"Transform tag and css when insert \'style\' tag into the DOM","link":"https://github.com/webpack-contrib/style-loader#styleTagTransform","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
|
|
400
400
|
);
|
|
@@ -422,6 +422,6 @@
|
|
|
422
422
|
}
|
|
423
423
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
424
424
|
__nccwpck_require__.ab = __dirname + "/";
|
|
425
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
425
|
+
var __webpack_exports__ = __nccwpck_require__(330);
|
|
426
426
|
module.exports = __webpack_exports__;
|
|
427
427
|
})();
|
package/dist/index.cjs
CHANGED
|
@@ -2259,7 +2259,7 @@ for(var __webpack_i__ in (()=>{
|
|
|
2259
2259
|
async function createContext(options, userConfig) {
|
|
2260
2260
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, external_node_path_namespaceObject.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, bundlerType = userConfig.provider ? 'webpack' : 'rspack';
|
|
2261
2261
|
return {
|
|
2262
|
-
version: "1.3.
|
|
2262
|
+
version: "1.3.20",
|
|
2263
2263
|
rootPath,
|
|
2264
2264
|
distPath: '',
|
|
2265
2265
|
cachePath,
|
|
@@ -4827,18 +4827,22 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
4827
4827
|
get: (_, prop)=>currentConfig[prop],
|
|
4828
4828
|
set: (_, prop, value)=>(currentConfig[prop] = value, !0)
|
|
4829
4829
|
}), utils = await getConfigUtils(proxiedConfig, chainUtils);
|
|
4830
|
-
|
|
4830
|
+
if ([currentConfig] = await context.hooks.modifyRspackConfig.callChain({
|
|
4831
4831
|
environment: utils.environment.name,
|
|
4832
4832
|
args: [
|
|
4833
4833
|
rspackConfig,
|
|
4834
4834
|
utils
|
|
4835
4835
|
]
|
|
4836
|
-
}),
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4836
|
+
}), null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.rspack) {
|
|
4837
|
+
let toolsRspackConfig = utils.environment.config.tools.rspack;
|
|
4838
|
+
currentConfig = await reduceConfigsAsyncWithContext({
|
|
4839
|
+
initial: currentConfig,
|
|
4840
|
+
config: toolsRspackConfig,
|
|
4841
|
+
ctx: utils,
|
|
4842
|
+
mergeFn: (...args)=>currentConfig = utils.mergeConfig.call(utils, args)
|
|
4843
|
+
});
|
|
4844
|
+
}
|
|
4845
|
+
return rslog_index_js_namespaceObject.logger.debug('modify Rspack config done'), currentConfig;
|
|
4842
4846
|
}
|
|
4843
4847
|
async function getConfigUtils(config, chainUtils) {
|
|
4844
4848
|
return {
|
|
@@ -7551,11 +7555,11 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
7551
7555
|
}
|
|
7552
7556
|
process.title = 'rsbuild-node';
|
|
7553
7557
|
let { npm_execpath } = process.env;
|
|
7554
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.3.
|
|
7558
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), rslog_index_js_namespaceObject.logger.greet(` Rsbuild v1.3.20\n`);
|
|
7555
7559
|
try {
|
|
7556
7560
|
!function() {
|
|
7557
7561
|
let cli = cac_dist('rsbuild');
|
|
7558
|
-
cli.help(), cli.version("1.3.
|
|
7562
|
+
cli.help(), cli.version("1.3.20"), applyCommonOptions(cli);
|
|
7559
7563
|
let devCommand = cli.command('', 'starting the dev server').alias('dev'), buildCommand = cli.command('build', 'build the app for production'), previewCommand = cli.command('preview', 'preview the production build locally'), inspectCommand = cli.command('inspect', 'inspect the Rspack and Rsbuild configs');
|
|
7560
7564
|
applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
|
|
7561
7565
|
try {
|
|
@@ -7606,7 +7610,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
7606
7610
|
rslog_index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), rslog_index_js_namespaceObject.logger.error(err);
|
|
7607
7611
|
}
|
|
7608
7612
|
}
|
|
7609
|
-
let src_version = "1.3.
|
|
7613
|
+
let src_version = "1.3.20";
|
|
7610
7614
|
})(), exports.PLUGIN_CSS_NAME = __webpack_exports__.PLUGIN_CSS_NAME, exports.PLUGIN_SWC_NAME = __webpack_exports__.PLUGIN_SWC_NAME, exports.createRsbuild = __webpack_exports__.createRsbuild, exports.defaultAllowedOrigins = __webpack_exports__.defaultAllowedOrigins, exports.defineConfig = __webpack_exports__.defineConfig, exports.ensureAssetPrefix = __webpack_exports__.ensureAssetPrefix, exports.loadConfig = __webpack_exports__.loadConfig, exports.loadEnv = __webpack_exports__.loadEnv, exports.logger = __webpack_exports__.logger, exports.mergeRsbuildConfig = __webpack_exports__.mergeRsbuildConfig, exports.rspack = __webpack_exports__.rspack, exports.runCLI = __webpack_exports__.runCLI, exports.version = __webpack_exports__.version, __webpack_exports__)-1 === [
|
|
7611
7615
|
"PLUGIN_CSS_NAME",
|
|
7612
7616
|
"PLUGIN_SWC_NAME",
|
package/dist/index.js
CHANGED
|
@@ -2116,7 +2116,7 @@ async function updateEnvironmentContext(context, configs) {
|
|
|
2116
2116
|
async function createContext(options, userConfig) {
|
|
2117
2117
|
let { cwd } = options, rootPath = userConfig.root ? getAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = (0, __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__.join)(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, bundlerType = userConfig.provider ? 'webpack' : 'rspack';
|
|
2118
2118
|
return {
|
|
2119
|
-
version: "1.3.
|
|
2119
|
+
version: "1.3.20",
|
|
2120
2120
|
rootPath,
|
|
2121
2121
|
distPath: '',
|
|
2122
2122
|
cachePath,
|
|
@@ -4672,18 +4672,22 @@ async function modifyRspackConfig(context, rspackConfig, chainUtils) {
|
|
|
4672
4672
|
get: (_, prop)=>currentConfig[prop],
|
|
4673
4673
|
set: (_, prop, value)=>(currentConfig[prop] = value, !0)
|
|
4674
4674
|
}), utils = await getConfigUtils(proxiedConfig, chainUtils);
|
|
4675
|
-
|
|
4675
|
+
if ([currentConfig] = await context.hooks.modifyRspackConfig.callChain({
|
|
4676
4676
|
environment: utils.environment.name,
|
|
4677
4677
|
args: [
|
|
4678
4678
|
rspackConfig,
|
|
4679
4679
|
utils
|
|
4680
4680
|
]
|
|
4681
|
-
}),
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4681
|
+
}), null == (_utils_environment_config_tools = utils.environment.config.tools) ? void 0 : _utils_environment_config_tools.rspack) {
|
|
4682
|
+
let toolsRspackConfig = utils.environment.config.tools.rspack;
|
|
4683
|
+
currentConfig = await reduceConfigsAsyncWithContext({
|
|
4684
|
+
initial: currentConfig,
|
|
4685
|
+
config: toolsRspackConfig,
|
|
4686
|
+
ctx: utils,
|
|
4687
|
+
mergeFn: (...args)=>currentConfig = utils.mergeConfig.call(utils, args)
|
|
4688
|
+
});
|
|
4689
|
+
}
|
|
4690
|
+
return __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.debug('modify Rspack config done'), currentConfig;
|
|
4687
4691
|
}
|
|
4688
4692
|
async function getConfigUtils(config, chainUtils) {
|
|
4689
4693
|
return {
|
|
@@ -7384,11 +7388,11 @@ async function runCLI() {
|
|
|
7384
7388
|
}
|
|
7385
7389
|
process.title = 'rsbuild-node';
|
|
7386
7390
|
let { npm_execpath } = process.env;
|
|
7387
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.3.
|
|
7391
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && console.log(), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.greet(` Rsbuild v1.3.20\n`);
|
|
7388
7392
|
try {
|
|
7389
7393
|
!function() {
|
|
7390
7394
|
let cli = cac_dist('rsbuild');
|
|
7391
|
-
cli.help(), cli.version("1.3.
|
|
7395
|
+
cli.help(), cli.version("1.3.20"), applyCommonOptions(cli);
|
|
7392
7396
|
let devCommand = cli.command('', 'starting the dev server').alias('dev'), buildCommand = cli.command('build', 'build the app for production'), previewCommand = cli.command('preview', 'preview the production build locally'), inspectCommand = cli.command('inspect', 'inspect the Rspack and Rsbuild configs');
|
|
7393
7397
|
applyServerOptions(devCommand), applyServerOptions(previewCommand), devCommand.action(async (options)=>{
|
|
7394
7398
|
try {
|
|
@@ -7439,6 +7443,6 @@ async function runCLI() {
|
|
|
7439
7443
|
__WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error('Failed to start Rsbuild CLI.'), __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger.error(err);
|
|
7440
7444
|
}
|
|
7441
7445
|
}
|
|
7442
|
-
let src_version = "1.3.
|
|
7446
|
+
let src_version = "1.3.20";
|
|
7443
7447
|
var __webpack_exports__logger = __WEBPACK_EXTERNAL_MODULE__compiled_rslog_index_js_c302f6e3__.logger, __webpack_exports__rspack = __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__.rspack;
|
|
7444
7448
|
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, config_loadConfig as loadConfig, loadEnv, mergeRsbuildConfig, runCLI, src_version as version, __webpack_exports__logger as logger, __webpack_exports__rspack as rspack };
|
|
@@ -38,8 +38,8 @@ export type RsbuildDevServer = {
|
|
|
38
38
|
*/
|
|
39
39
|
port: number;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
* Rsbuild will trigger `onAfterStartDevServer` hook
|
|
41
|
+
* Notifies Rsbuild that the custom server has successfully started.
|
|
42
|
+
* Rsbuild will trigger the `onAfterStartDevServer` hook at this stage.
|
|
43
43
|
*/
|
|
44
44
|
afterListen: () => Promise<void>;
|
|
45
45
|
/**
|
|
@@ -14,7 +14,7 @@ import type { ModifyWebpackChainUtils, ModifyWebpackConfigUtils, RsbuildPlugins
|
|
|
14
14
|
import type { RsbuildEntry, RsbuildMode, RsbuildTarget } from './rsbuild';
|
|
15
15
|
import type { BundlerPluginInstance, Rspack, RspackRule } from './rspack';
|
|
16
16
|
import type { CSSExtractOptions, CSSLoaderModulesOptions, CSSLoaderOptions, HtmlRspackPlugin, PostCSSLoaderOptions, PostCSSPlugin, StyleLoaderOptions, WebpackConfig } from './thirdParty';
|
|
17
|
-
import type { ConfigChain,
|
|
17
|
+
import type { ConfigChain, ConfigChainMergeContext, ConfigChainWithContext, DeepReadonly, MaybePromise, OneOrMany } from './utils';
|
|
18
18
|
export type ToolsSwcConfig = ConfigChain<SwcLoaderOptions>;
|
|
19
19
|
export type ToolsBundlerChainConfig = OneOrMany<(chain: RspackChain, utils: ModifyBundlerChainUtils) => MaybePromise<void>>;
|
|
20
20
|
export type ToolsPostCSSLoaderConfig = ConfigChainWithContext<PostCSSLoaderOptions, {
|
|
@@ -26,16 +26,62 @@ export type ToolsHtmlPluginConfig = ConfigChainWithContext<HtmlRspackPlugin.Opti
|
|
|
26
26
|
entryName: string;
|
|
27
27
|
entryValue: (string | string[] | Rspack.EntryDescription)[];
|
|
28
28
|
}>;
|
|
29
|
-
export type
|
|
29
|
+
export type RspackMerge = (firstConfiguration: Rspack.Configuration | Rspack.Configuration[], ...configurations: Rspack.Configuration[]) => Rspack.Configuration;
|
|
30
30
|
export type ModifyRspackConfigUtils = ModifyChainUtils & {
|
|
31
31
|
addRules: (rules: RspackRule | RspackRule[]) => void;
|
|
32
32
|
appendRules: (rules: RspackRule | RspackRule[]) => void;
|
|
33
33
|
prependPlugins: (plugins: BundlerPluginInstance | BundlerPluginInstance[]) => void;
|
|
34
34
|
appendPlugins: (plugins: BundlerPluginInstance | BundlerPluginInstance[]) => void;
|
|
35
35
|
removePlugin: (pluginName: string) => void;
|
|
36
|
-
mergeConfig:
|
|
36
|
+
mergeConfig: RspackMerge;
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Narrow the type of Rspack.Configuration to make it easier
|
|
40
|
+
* to use `tools.rspack` function. These properties are set
|
|
41
|
+
* by Rsbuild by default so they are non-nullable.
|
|
42
|
+
*
|
|
43
|
+
* - With `Rspack.Configuration`, the `plugins` property is nullable:
|
|
44
|
+
*
|
|
45
|
+
* ```js
|
|
46
|
+
* tools: {
|
|
47
|
+
* rspack(config) {
|
|
48
|
+
* if (!config.plugins) {
|
|
49
|
+
* config.plugins = [];
|
|
50
|
+
* }
|
|
51
|
+
* config.plugins.push(new SomePlugin());
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* - With `NarrowedRspackConfig`, the `plugins` property is non-nullable:
|
|
57
|
+
*
|
|
58
|
+
* ```js
|
|
59
|
+
* tools: {
|
|
60
|
+
* rspack(config) {
|
|
61
|
+
* config.plugins.push(new SomePlugin());
|
|
62
|
+
* }
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export type NarrowedRspackConfig = Omit<Rspack.Configuration, 'plugins' | 'module' | 'resolve' | 'output'> & {
|
|
67
|
+
/**
|
|
68
|
+
* Plugins to use during compilation.
|
|
69
|
+
*/
|
|
70
|
+
plugins: NonNullable<Rspack.Configuration['plugins']>;
|
|
71
|
+
/**
|
|
72
|
+
* Options for module configuration.
|
|
73
|
+
*/
|
|
74
|
+
module: NonNullable<Rspack.Configuration['module']>;
|
|
75
|
+
/**
|
|
76
|
+
* Options for resolving modules.
|
|
77
|
+
*/
|
|
78
|
+
resolve: NonNullable<Rspack.Configuration['resolve']>;
|
|
79
|
+
/**
|
|
80
|
+
* Configuration for the output of the compilation.
|
|
81
|
+
*/
|
|
82
|
+
output: NonNullable<Rspack.Configuration['output']>;
|
|
83
|
+
};
|
|
84
|
+
export type ToolsRspackConfig = OneOrMany<Rspack.Configuration | ((config: NarrowedRspackConfig, ctx: ModifyRspackConfigUtils) => MaybePromise<Rspack.Configuration | void>)>;
|
|
39
85
|
export type ToolsWebpackConfig = ConfigChainWithContext<WebpackConfig, ModifyWebpackConfigUtils>;
|
|
40
86
|
export type ToolsWebpackChainConfig = OneOrMany<(chain: RspackChain, utils: ModifyWebpackChainUtils) => void>;
|
|
41
87
|
export interface ToolsConfig {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { RuleSetRule, Configuration as WebpackConfig, WebpackPluginInstance } from 'webpack';
|
|
3
3
|
import type RspackChain from '../../compiled/rspack-chain';
|
|
4
4
|
import type { ChainIdentifier } from '../configChain';
|
|
5
|
-
import type { ModifyRspackConfigUtils, NormalizedConfig, NormalizedEnvironmentConfig, RsbuildConfig,
|
|
5
|
+
import type { ModifyRspackConfigUtils, NarrowedRspackConfig, NormalizedConfig, NormalizedEnvironmentConfig, RsbuildConfig, RspackMerge } from './config';
|
|
6
6
|
import type { RsbuildContext } from './context';
|
|
7
7
|
import type { EnvironmentContext, ModifyBundlerChainFn, ModifyChainUtils, ModifyEnvironmentConfigFn, ModifyHTMLFn, ModifyHTMLTagsFn, ModifyRsbuildConfigFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterEnvironmentCompileFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeCreateCompilerFn, OnBeforeEnvironmentCompileFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnCloseBuildFn, OnCloseDevServerFn, OnDevCompileDoneFn, OnExitFn } from './hooks';
|
|
8
8
|
import type { RsbuildInstance, RsbuildTarget } from './rsbuild';
|
|
@@ -92,7 +92,7 @@ export type AsyncHook<Callback extends (...args: any[]) => T, T = any> = {
|
|
|
92
92
|
*/
|
|
93
93
|
callBatch: (...args: Parameters<Callback>) => Promise<Awaited<ReturnType<Callback>>[]>;
|
|
94
94
|
};
|
|
95
|
-
export type ModifyRspackConfigFn = (config:
|
|
95
|
+
export type ModifyRspackConfigFn = (config: NarrowedRspackConfig, utils: ModifyRspackConfigUtils) => MaybePromise<Rspack.Configuration | void>;
|
|
96
96
|
export type ModifyWebpackChainUtils = ModifyChainUtils & {
|
|
97
97
|
/** @ts-ignore `webpack` type only exists when `@rsbuild/webpack` is installed */
|
|
98
98
|
webpack: typeof import('webpack');
|
|
@@ -112,7 +112,7 @@ export type ModifyWebpackConfigUtils = ModifyWebpackChainUtils & {
|
|
|
112
112
|
prependPlugins: (plugins: WebpackPluginInstance | WebpackPluginInstance[]) => void;
|
|
113
113
|
appendPlugins: (plugins: WebpackPluginInstance | WebpackPluginInstance[]) => void;
|
|
114
114
|
removePlugin: (pluginName: string) => void;
|
|
115
|
-
mergeConfig:
|
|
115
|
+
mergeConfig: RspackMerge;
|
|
116
116
|
};
|
|
117
117
|
export type ModifyWebpackChainFn = (chain: RspackChain, utils: ModifyWebpackChainUtils) => Promise<void> | void;
|
|
118
118
|
export type ModifyWebpackConfigFn = (config: WebpackConfig, utils: ModifyWebpackConfigUtils) => Promise<WebpackConfig | void> | WebpackConfig | void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.20",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "1.3.
|
|
49
|
+
"@rspack/core": "1.3.10",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.17",
|
|
52
52
|
"core-js": "~3.42.0",
|
|
53
53
|
"jiti": "^2.4.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@rslib/core": "0.
|
|
56
|
+
"@rslib/core": "0.7.0",
|
|
57
57
|
"@types/connect": "3.4.38",
|
|
58
58
|
"@types/cors": "^2.8.18",
|
|
59
59
|
"@types/node": "^22.15.17",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"style-loader": "3.3.4",
|
|
91
91
|
"tinyglobby": "^0.2.13",
|
|
92
92
|
"typescript": "^5.8.3",
|
|
93
|
-
"webpack": "^5.
|
|
93
|
+
"webpack": "^5.99.8",
|
|
94
94
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
95
95
|
"webpack-merge": "6.0.1",
|
|
96
96
|
"ws": "^8.18.2"
|