@rsbuild/core 1.4.0-rc.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/css-loader/index.js +18 -18
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rslog/index.d.ts +69 -63
- package/compiled/rslog/package.json +1 -1
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/dist/index.cjs +37 -11
- package/dist/index.js +35 -11
- package/dist-types/inspectConfig.d.ts +9 -9
- package/dist-types/types/hooks.d.ts +31 -0
- package/dist-types/types/rsbuild.d.ts +13 -0
- package/package.json +5 -5
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
4420: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(2922);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(9515).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
2922: (__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__(6809);
|
|
16
|
+
var _utils = __nccwpck_require__(9515);
|
|
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
|
+
6809: (__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,22 +258,22 @@
|
|
|
258
258
|
},
|
|
259
259
|
});
|
|
260
260
|
var _postcssImportParser = _interopRequireDefault(
|
|
261
|
-
__nccwpck_require__(
|
|
261
|
+
__nccwpck_require__(8210),
|
|
262
262
|
);
|
|
263
263
|
var _postcssIcssParser = _interopRequireDefault(
|
|
264
|
-
__nccwpck_require__(
|
|
264
|
+
__nccwpck_require__(9691),
|
|
265
265
|
);
|
|
266
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
266
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(4526));
|
|
267
267
|
function _interopRequireDefault(obj) {
|
|
268
268
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
|
-
|
|
271
|
+
9691: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
272
272
|
"use strict";
|
|
273
273
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
274
274
|
exports["default"] = void 0;
|
|
275
275
|
var _icssUtils = __nccwpck_require__(9028);
|
|
276
|
-
var _utils = __nccwpck_require__(
|
|
276
|
+
var _utils = __nccwpck_require__(9515);
|
|
277
277
|
const plugin = (options = {}) => ({
|
|
278
278
|
postcssPlugin: "postcss-icss-parser",
|
|
279
279
|
async OnceExit(root) {
|
|
@@ -372,14 +372,14 @@
|
|
|
372
372
|
plugin.postcss = true;
|
|
373
373
|
var _default = (exports["default"] = plugin);
|
|
374
374
|
},
|
|
375
|
-
|
|
375
|
+
8210: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
376
376
|
"use strict";
|
|
377
377
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
378
378
|
exports["default"] = void 0;
|
|
379
379
|
var _postcssValueParser = _interopRequireDefault(
|
|
380
380
|
__nccwpck_require__(2948),
|
|
381
381
|
);
|
|
382
|
-
var _utils = __nccwpck_require__(
|
|
382
|
+
var _utils = __nccwpck_require__(9515);
|
|
383
383
|
function _interopRequireDefault(obj) {
|
|
384
384
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
385
385
|
}
|
|
@@ -684,14 +684,14 @@
|
|
|
684
684
|
plugin.postcss = true;
|
|
685
685
|
var _default = (exports["default"] = plugin);
|
|
686
686
|
},
|
|
687
|
-
|
|
687
|
+
4526: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
688
688
|
"use strict";
|
|
689
689
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
690
690
|
exports["default"] = void 0;
|
|
691
691
|
var _postcssValueParser = _interopRequireDefault(
|
|
692
692
|
__nccwpck_require__(2948),
|
|
693
693
|
);
|
|
694
|
-
var _utils = __nccwpck_require__(
|
|
694
|
+
var _utils = __nccwpck_require__(9515);
|
|
695
695
|
function _interopRequireDefault(obj) {
|
|
696
696
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
697
697
|
}
|
|
@@ -1034,7 +1034,7 @@
|
|
|
1034
1034
|
plugin.postcss = true;
|
|
1035
1035
|
var _default = (exports["default"] = plugin);
|
|
1036
1036
|
},
|
|
1037
|
-
|
|
1037
|
+
9515: (__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
1038
1038
|
"use strict";
|
|
1039
1039
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1040
1040
|
exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
|
|
@@ -8098,6 +8098,6 @@
|
|
|
8098
8098
|
}
|
|
8099
8099
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
8100
8100
|
__nccwpck_require__.ab = __dirname + "/";
|
|
8101
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
8101
|
+
var __webpack_exports__ = __nccwpck_require__(4420);
|
|
8102
8102
|
module.exports = __webpack_exports__;
|
|
8103
8103
|
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
29: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const { HtmlWebpackChildCompiler } = __nccwpck_require__(
|
|
5
|
+
const { HtmlWebpackChildCompiler } = __nccwpck_require__(550);
|
|
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
|
+
550: (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
|
+
950: (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
|
+
529: (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
|
+
368: (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
|
+
949: (module) => {
|
|
550
550
|
const voidTags = [
|
|
551
551
|
"area",
|
|
552
552
|
"base",
|
|
@@ -614,19 +614,19 @@
|
|
|
614
614
|
htmlTagObjectToString,
|
|
615
615
|
};
|
|
616
616
|
},
|
|
617
|
-
|
|
617
|
+
568: (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__(29);
|
|
624
624
|
const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } =
|
|
625
|
-
__nccwpck_require__(
|
|
626
|
-
const prettyError = __nccwpck_require__(
|
|
627
|
-
const chunkSorter = __nccwpck_require__(
|
|
625
|
+
__nccwpck_require__(949);
|
|
626
|
+
const prettyError = __nccwpck_require__(529);
|
|
627
|
+
const chunkSorter = __nccwpck_require__(950);
|
|
628
628
|
const getHtmlRspackPluginHooks =
|
|
629
|
-
__nccwpck_require__(
|
|
629
|
+
__nccwpck_require__(368).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__(568);
|
|
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
|
+
636: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(378)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
378: (__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__(427);
|
|
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
|
+
427: (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__(636);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -1,67 +1,73 @@
|
|
|
1
|
-
type ColorFn = (input: string | number | null | undefined) => string;
|
|
2
|
-
|
|
3
|
-
declare let
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
declare type ColorFn = (input: string | number | null | undefined) => string;
|
|
2
|
+
|
|
3
|
+
declare let createLogger: (options?: Options) => Logger;
|
|
4
|
+
|
|
5
|
+
declare let LOG_TYPES: {
|
|
6
|
+
error: {
|
|
7
|
+
label: string;
|
|
8
|
+
level: "error";
|
|
9
|
+
color: ColorFn;
|
|
10
|
+
};
|
|
11
|
+
warn: {
|
|
12
|
+
label: string;
|
|
13
|
+
level: "warn";
|
|
14
|
+
color: ColorFn;
|
|
15
|
+
};
|
|
16
|
+
info: {
|
|
17
|
+
label: string;
|
|
18
|
+
level: "info";
|
|
19
|
+
color: ColorFn;
|
|
20
|
+
};
|
|
21
|
+
start: {
|
|
22
|
+
label: string;
|
|
23
|
+
level: "info";
|
|
24
|
+
color: ColorFn;
|
|
25
|
+
};
|
|
26
|
+
ready: {
|
|
27
|
+
label: string;
|
|
28
|
+
level: "info";
|
|
29
|
+
color: ColorFn;
|
|
30
|
+
};
|
|
31
|
+
success: {
|
|
32
|
+
label: string;
|
|
33
|
+
level: "info";
|
|
34
|
+
color: ColorFn;
|
|
35
|
+
};
|
|
36
|
+
log: {
|
|
37
|
+
level: "info";
|
|
38
|
+
};
|
|
39
|
+
debug: {
|
|
40
|
+
label: string;
|
|
41
|
+
level: "verbose";
|
|
42
|
+
color: ColorFn;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare type LogFunction = (message?: LogMessage, ...args: any[]) => void;
|
|
47
|
+
|
|
48
|
+
declare type Logger = Record<LogMethods, LogFunction> & {
|
|
49
|
+
greet: (message: string) => void;
|
|
50
|
+
level: LogLevel;
|
|
51
|
+
override: (customLogger: Partial<Record<LogMethods, LogFunction>>) => void;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
declare let logger: Logger;
|
|
55
|
+
|
|
56
|
+
declare type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'log' | 'verbose';
|
|
57
|
+
|
|
58
|
+
declare type LogMessage = unknown;
|
|
59
|
+
|
|
60
|
+
declare type LogMethods = keyof typeof LOG_TYPES;
|
|
61
|
+
|
|
62
|
+
declare interface LogType {
|
|
63
|
+
label?: string;
|
|
64
|
+
level: LogLevel;
|
|
65
|
+
color?: ColorFn;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare interface Options {
|
|
69
|
+
level?: LogLevel;
|
|
54
70
|
}
|
|
55
|
-
type LogMethods = keyof typeof LOG_TYPES;
|
|
56
|
-
type Logger = Record<LogMethods, LogFunction> & {
|
|
57
|
-
greet: (message: string) => void;
|
|
58
|
-
level: LogLevel;
|
|
59
|
-
override: (customLogger: Partial<Record<LogMethods, LogFunction>>) => void;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
declare let createLogger: (options?: Options) => Logger;
|
|
63
|
-
|
|
64
|
-
declare let logger: Logger;
|
|
65
71
|
|
|
66
72
|
export { createLogger, logger };
|
|
67
73
|
export type { LogFunction, LogLevel, LogMessage, LogType, Logger, Options };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"rslog","version":"1.2.
|
|
1
|
+
{"name":"rslog","version":"1.2.8","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
4
|
+
543: (__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
|
+
994: (__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__(543);
|
|
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__(994);
|
|
316
316
|
Object.defineProperty(exports, "getCompilerHooks", {
|
|
317
317
|
enumerable: true,
|
|
318
318
|
get: function () {
|
package/dist/index.cjs
CHANGED
|
@@ -2247,7 +2247,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2247
2247
|
async function createContext(options, userConfig) {
|
|
2248
2248
|
let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(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';
|
|
2249
2249
|
return {
|
|
2250
|
-
version: "1.4.
|
|
2250
|
+
version: "1.4.1",
|
|
2251
2251
|
rootPath,
|
|
2252
2252
|
distPath: '',
|
|
2253
2253
|
cachePath,
|
|
@@ -2294,7 +2294,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2294
2294
|
setup () {}
|
|
2295
2295
|
};
|
|
2296
2296
|
};
|
|
2297
|
-
async function outputInspectConfigFiles({ rawBundlerConfigs, rawEnvironmentConfigs, inspectOptions, configType }) {
|
|
2297
|
+
async function outputInspectConfigFiles({ rawBundlerConfigs, rawEnvironmentConfigs, inspectOptions, rawExtraConfigs, configType }) {
|
|
2298
2298
|
let { outputPath } = inspectOptions, files = [
|
|
2299
2299
|
...rawEnvironmentConfigs.map(({ name, content })=>{
|
|
2300
2300
|
if (1 === rawEnvironmentConfigs.length) return {
|
|
@@ -2316,7 +2316,12 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2316
2316
|
label: `${upperFirst(configType)} Config (${name})`,
|
|
2317
2317
|
content
|
|
2318
2318
|
};
|
|
2319
|
-
})
|
|
2319
|
+
}),
|
|
2320
|
+
...(rawExtraConfigs || []).map(({ name, content })=>({
|
|
2321
|
+
path: (0, external_node_path_namespaceObject.join)(outputPath, `${name}.config.mjs`),
|
|
2322
|
+
label: `${upperFirst(name)} Config`,
|
|
2323
|
+
content
|
|
2324
|
+
}))
|
|
2320
2325
|
];
|
|
2321
2326
|
await external_node_fs_default().promises.mkdir(outputPath, {
|
|
2322
2327
|
recursive: !0
|
|
@@ -2362,10 +2367,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2362
2367
|
normalizedConfig: context.normalizedConfig,
|
|
2363
2368
|
inspectOptions,
|
|
2364
2369
|
pluginManager
|
|
2365
|
-
}), outputPath = (context1 = context, (inspectOptions1 = inspectOptions).outputPath ? (0, external_node_path_namespaceObject.isAbsolute)(inspectOptions1.outputPath) ? inspectOptions1.outputPath : (0, external_node_path_namespaceObject.join)(context1.distPath, inspectOptions1.outputPath) : (0, external_node_path_namespaceObject.join)(context1.distPath, RSBUILD_OUTPUTS_PATH))
|
|
2370
|
+
}), outputPath = (context1 = context, (inspectOptions1 = inspectOptions).outputPath ? (0, external_node_path_namespaceObject.isAbsolute)(inspectOptions1.outputPath) ? inspectOptions1.outputPath : (0, external_node_path_namespaceObject.join)(context1.distPath, inspectOptions1.outputPath) : (0, external_node_path_namespaceObject.join)(context1.distPath, RSBUILD_OUTPUTS_PATH)), rawExtraConfigs = inspectOptions.extraConfigs ? Object.entries(inspectOptions.extraConfigs).map(([name, content])=>({
|
|
2371
|
+
name,
|
|
2372
|
+
content: 'string' == typeof content ? content : stringifyConfig(content, inspectOptions.verbose)
|
|
2373
|
+
})) : void 0;
|
|
2366
2374
|
return inspectOptions.writeToDisk && await outputInspectConfigFiles({
|
|
2367
2375
|
rawBundlerConfigs,
|
|
2368
2376
|
rawEnvironmentConfigs,
|
|
2377
|
+
rawExtraConfigs,
|
|
2369
2378
|
inspectOptions: {
|
|
2370
2379
|
...inspectOptions,
|
|
2371
2380
|
outputPath
|
|
@@ -4592,7 +4601,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
4592
4601
|
for (let middleware of proxyMiddlewares)'function' == typeof middleware.upgrade && middleware.upgrade(req, socket, head);
|
|
4593
4602
|
}
|
|
4594
4603
|
};
|
|
4595
|
-
}, applyDefaultMiddlewares = async ({
|
|
4604
|
+
}, applyDefaultMiddlewares = async ({ devServerAPI, middlewares, server, compilationManager, context, pwd, postCallbacks })=>{
|
|
4596
4605
|
let upgradeEvents = [];
|
|
4597
4606
|
if (server.cors) {
|
|
4598
4607
|
let { default: corsMiddleware } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../compiled/cors/index.js"));
|
|
@@ -4606,7 +4615,17 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
4606
4615
|
let { middlewares: proxyMiddlewares, upgrade } = await createProxyMiddleware(server.proxy);
|
|
4607
4616
|
for (let middleware of (upgradeEvents.push(upgrade), proxyMiddlewares))middlewares.push(middleware);
|
|
4608
4617
|
}
|
|
4609
|
-
server.compress && middlewares.push(gzipMiddleware()), 'dev' === context.action && 'rspack' === context.bundlerType &&
|
|
4618
|
+
if (server.compress && middlewares.push(gzipMiddleware()), 'dev' === context.action && 'rspack' === context.bundlerType && compilationManager) {
|
|
4619
|
+
let { compiler } = compilationManager;
|
|
4620
|
+
(()=>{
|
|
4621
|
+
var _compiler_options_experiments;
|
|
4622
|
+
return helpers_isMultiCompiler(compiler) ? compiler.compilers.some((childCompiler)=>{
|
|
4623
|
+
var _childCompiler_options_experiments;
|
|
4624
|
+
return null == (_childCompiler_options_experiments = childCompiler.options.experiments) ? void 0 : _childCompiler_options_experiments.lazyCompilation;
|
|
4625
|
+
}) : null == (_compiler_options_experiments = compiler.options.experiments) ? void 0 : _compiler_options_experiments.lazyCompilation;
|
|
4626
|
+
})() && middlewares.push(core_namespaceObject.rspack.experiments.lazyCompilationMiddleware(compiler));
|
|
4627
|
+
}
|
|
4628
|
+
server.base && '/' !== server.base && middlewares.push(getBaseMiddleware({
|
|
4610
4629
|
base: server.base
|
|
4611
4630
|
}));
|
|
4612
4631
|
let { default: launchEditorMiddleware } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../compiled/launch-editor-middleware/index.js"));
|
|
@@ -5465,7 +5484,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
5465
5484
|
{
|
|
5466
5485
|
name: 'rsbuild:basic',
|
|
5467
5486
|
setup (api) {
|
|
5468
|
-
api.modifyBundlerChain((chain, {
|
|
5487
|
+
api.modifyBundlerChain((chain, { isDev, target, bundler, environment, CHAIN_ID })=>{
|
|
5469
5488
|
let { config } = environment;
|
|
5470
5489
|
chain.name(environment.name);
|
|
5471
5490
|
let devtool = ((config)=>{
|
|
@@ -5487,7 +5506,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
5487
5506
|
javascript: {
|
|
5488
5507
|
exportsPresence: 'error'
|
|
5489
5508
|
}
|
|
5490
|
-
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin),
|
|
5509
|
+
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin), isDev && chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)), 'rspack' === api.context.bundlerType && chain.experiments({
|
|
5510
|
+
...chain.get('experiments'),
|
|
5511
|
+
rspackFuture: {
|
|
5512
|
+
bundlerInfo: {
|
|
5513
|
+
force: !!config.security.sri.enable
|
|
5514
|
+
}
|
|
5515
|
+
}
|
|
5516
|
+
}), process.env.RSPACK_CONFIG_VALIDATE ||= 'loose-silent';
|
|
5491
5517
|
});
|
|
5492
5518
|
}
|
|
5493
5519
|
},
|
|
@@ -7502,11 +7528,11 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
7502
7528
|
].includes(level) && (index_js_namespaceObject.logger.level = level);
|
|
7503
7529
|
}
|
|
7504
7530
|
let { npm_execpath } = process.env;
|
|
7505
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && index_js_namespaceObject.logger.log(), index_js_namespaceObject.logger.greet(` Rsbuild v1.4.
|
|
7531
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && index_js_namespaceObject.logger.log(), index_js_namespaceObject.logger.greet(` Rsbuild v1.4.1\n`);
|
|
7506
7532
|
try {
|
|
7507
7533
|
!function() {
|
|
7508
7534
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
7509
|
-
cli.help(), cli.version("1.4.
|
|
7535
|
+
cli.help(), cli.version("1.4.1"), cli.option('--base <base>', 'specify the base path of the server').option('-c, --config <config>', 'specify the configuration file, can be a relative or absolute path').option('--config-loader <loader>', 'specify the loader to load the config file, can be `jiti` or `native`', {
|
|
7510
7536
|
default: 'jiti'
|
|
7511
7537
|
}).option('-r, --root <root>', 'specify the project root directory, can be an absolute path or a path relative to cwd').option('-m, --mode <mode>', 'specify the build mode, can be `development`, `production` or `none`').option('--log-level <level>', 'specify the log level, can be `info`, `warn`, `error` or `silent`').option('--env-mode <mode>', 'specify the env mode to load the `.env.[mode]` file').option('--environment <name>', 'specify the name of environment to build', {
|
|
7512
7538
|
type: [
|
|
@@ -7564,7 +7590,7 @@ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
|
|
|
7564
7590
|
index_js_namespaceObject.logger.error('Failed to start Rsbuild CLI.'), index_js_namespaceObject.logger.error(err);
|
|
7565
7591
|
}
|
|
7566
7592
|
}
|
|
7567
|
-
let src_version = "1.4.
|
|
7593
|
+
let src_version = "1.4.1";
|
|
7568
7594
|
})(), 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 === [
|
|
7569
7595
|
"PLUGIN_CSS_NAME",
|
|
7570
7596
|
"PLUGIN_SWC_NAME",
|
package/dist/index.js
CHANGED
|
@@ -2059,7 +2059,7 @@ async function updateEnvironmentContext(context, configs) {
|
|
|
2059
2059
|
async function createContext(options, userConfig) {
|
|
2060
2060
|
let { cwd } = options, rootPath = userConfig.root ? ensureAbsolutePath(cwd, userConfig.root) : cwd, rsbuildConfig = await withDefaultConfig(rootPath, userConfig), cachePath = join(rootPath, 'node_modules', '.cache'), specifiedEnvironments = options.environment && options.environment.length > 0 ? options.environment : void 0, bundlerType = userConfig.provider ? 'webpack' : 'rspack';
|
|
2061
2061
|
return {
|
|
2062
|
-
version: "1.4.
|
|
2062
|
+
version: "1.4.1",
|
|
2063
2063
|
rootPath,
|
|
2064
2064
|
distPath: '',
|
|
2065
2065
|
cachePath,
|
|
@@ -2104,7 +2104,7 @@ let normalizePluginObject = (plugin)=>{
|
|
|
2104
2104
|
setup () {}
|
|
2105
2105
|
};
|
|
2106
2106
|
};
|
|
2107
|
-
async function outputInspectConfigFiles({ rawBundlerConfigs, rawEnvironmentConfigs, inspectOptions, configType }) {
|
|
2107
|
+
async function outputInspectConfigFiles({ rawBundlerConfigs, rawEnvironmentConfigs, inspectOptions, rawExtraConfigs, configType }) {
|
|
2108
2108
|
let { outputPath } = inspectOptions, files = [
|
|
2109
2109
|
...rawEnvironmentConfigs.map(({ name, content })=>1 === rawEnvironmentConfigs.length ? {
|
|
2110
2110
|
path: join(outputPath, 'rsbuild.config.mjs'),
|
|
@@ -2122,7 +2122,12 @@ async function outputInspectConfigFiles({ rawBundlerConfigs, rawEnvironmentConfi
|
|
|
2122
2122
|
label: `${upperFirst(configType)} Config (${name})`,
|
|
2123
2123
|
content
|
|
2124
2124
|
};
|
|
2125
|
-
})
|
|
2125
|
+
}),
|
|
2126
|
+
...(rawExtraConfigs || []).map(({ name, content })=>({
|
|
2127
|
+
path: join(outputPath, `${name}.config.mjs`),
|
|
2128
|
+
label: `${upperFirst(name)} Config`,
|
|
2129
|
+
content
|
|
2130
|
+
}))
|
|
2126
2131
|
];
|
|
2127
2132
|
await node_fs.promises.mkdir(outputPath, {
|
|
2128
2133
|
recursive: !0
|
|
@@ -2168,10 +2173,14 @@ async function inspectConfig({ context, pluginManager, bundlerConfigs, inspectOp
|
|
|
2168
2173
|
normalizedConfig: context.normalizedConfig,
|
|
2169
2174
|
inspectOptions,
|
|
2170
2175
|
pluginManager
|
|
2171
|
-
}), outputPath = (context1 = context, (inspectOptions1 = inspectOptions).outputPath ? external_node_path_isAbsolute(inspectOptions1.outputPath) ? inspectOptions1.outputPath : join(context1.distPath, inspectOptions1.outputPath) : join(context1.distPath, RSBUILD_OUTPUTS_PATH))
|
|
2176
|
+
}), outputPath = (context1 = context, (inspectOptions1 = inspectOptions).outputPath ? external_node_path_isAbsolute(inspectOptions1.outputPath) ? inspectOptions1.outputPath : join(context1.distPath, inspectOptions1.outputPath) : join(context1.distPath, RSBUILD_OUTPUTS_PATH)), rawExtraConfigs = inspectOptions.extraConfigs ? Object.entries(inspectOptions.extraConfigs).map(([name, content])=>({
|
|
2177
|
+
name,
|
|
2178
|
+
content: 'string' == typeof content ? content : stringifyConfig(content, inspectOptions.verbose)
|
|
2179
|
+
})) : void 0;
|
|
2172
2180
|
return inspectOptions.writeToDisk && await outputInspectConfigFiles({
|
|
2173
2181
|
rawBundlerConfigs,
|
|
2174
2182
|
rawEnvironmentConfigs,
|
|
2183
|
+
rawExtraConfigs,
|
|
2175
2184
|
inspectOptions: {
|
|
2176
2185
|
...inspectOptions,
|
|
2177
2186
|
outputPath
|
|
@@ -4388,7 +4397,7 @@ let ENCODING_REGEX = /\bgzip\b/, CONTENT_TYPE_REGEX = /text|javascript|\/json|xm
|
|
|
4388
4397
|
for (let middleware of proxyMiddlewares)'function' == typeof middleware.upgrade && middleware.upgrade(req, socket, head);
|
|
4389
4398
|
}
|
|
4390
4399
|
};
|
|
4391
|
-
}, applyDefaultMiddlewares = async ({
|
|
4400
|
+
}, applyDefaultMiddlewares = async ({ devServerAPI, middlewares, server, compilationManager, context, pwd, postCallbacks })=>{
|
|
4392
4401
|
let upgradeEvents = [];
|
|
4393
4402
|
if (server.cors) {
|
|
4394
4403
|
let { default: corsMiddleware } = await import("../compiled/cors/index.js");
|
|
@@ -4402,7 +4411,15 @@ let ENCODING_REGEX = /\bgzip\b/, CONTENT_TYPE_REGEX = /text|javascript|\/json|xm
|
|
|
4402
4411
|
let { middlewares: proxyMiddlewares, upgrade } = await createProxyMiddleware(server.proxy);
|
|
4403
4412
|
for (let middleware of (upgradeEvents.push(upgrade), proxyMiddlewares))middlewares.push(middleware);
|
|
4404
4413
|
}
|
|
4405
|
-
server.compress && middlewares.push(gzipMiddleware()), 'dev' === context.action && 'rspack' === context.bundlerType &&
|
|
4414
|
+
if (server.compress && middlewares.push(gzipMiddleware()), 'dev' === context.action && 'rspack' === context.bundlerType && compilationManager) {
|
|
4415
|
+
var _compiler_options_experiments;
|
|
4416
|
+
let { compiler } = compilationManager;
|
|
4417
|
+
(helpers_isMultiCompiler(compiler) ? compiler.compilers.some((childCompiler)=>{
|
|
4418
|
+
var _childCompiler_options_experiments;
|
|
4419
|
+
return null == (_childCompiler_options_experiments = childCompiler.options.experiments) ? void 0 : _childCompiler_options_experiments.lazyCompilation;
|
|
4420
|
+
}) : null == (_compiler_options_experiments = compiler.options.experiments) ? void 0 : _compiler_options_experiments.lazyCompilation) && middlewares.push(rspack.experiments.lazyCompilationMiddleware(compiler));
|
|
4421
|
+
}
|
|
4422
|
+
server.base && '/' !== server.base && middlewares.push(getBaseMiddleware({
|
|
4406
4423
|
base: server.base
|
|
4407
4424
|
}));
|
|
4408
4425
|
let { default: launchEditorMiddleware } = await import("../compiled/launch-editor-middleware/index.js");
|
|
@@ -5253,7 +5270,7 @@ async function applyDefaultPlugins(pluginManager, context) {
|
|
|
5253
5270
|
{
|
|
5254
5271
|
name: 'rsbuild:basic',
|
|
5255
5272
|
setup (api) {
|
|
5256
|
-
api.modifyBundlerChain((chain, {
|
|
5273
|
+
api.modifyBundlerChain((chain, { isDev, target, bundler, environment, CHAIN_ID })=>{
|
|
5257
5274
|
let { config } = environment;
|
|
5258
5275
|
chain.name(environment.name);
|
|
5259
5276
|
let devtool = ((config)=>{
|
|
@@ -5275,7 +5292,14 @@ async function applyDefaultPlugins(pluginManager, context) {
|
|
|
5275
5292
|
javascript: {
|
|
5276
5293
|
exportsPresence: 'error'
|
|
5277
5294
|
}
|
|
5278
|
-
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin),
|
|
5295
|
+
}), isDev && config.dev.hmr && 'web' === target && chain.plugin(CHAIN_ID.PLUGIN.HMR).use(bundler.HotModuleReplacementPlugin), isDev && chain.output.devtoolModuleFilenameTemplate((info)=>toPosixPath(info.absoluteResourcePath)), 'rspack' === api.context.bundlerType && chain.experiments({
|
|
5296
|
+
...chain.get('experiments'),
|
|
5297
|
+
rspackFuture: {
|
|
5298
|
+
bundlerInfo: {
|
|
5299
|
+
force: !!config.security.sri.enable
|
|
5300
|
+
}
|
|
5301
|
+
}
|
|
5302
|
+
}), process.env.RSPACK_CONFIG_VALIDATE ||= 'loose-silent';
|
|
5279
5303
|
});
|
|
5280
5304
|
}
|
|
5281
5305
|
},
|
|
@@ -7284,11 +7308,11 @@ async function runCLI() {
|
|
|
7284
7308
|
].includes(level) && (logger.level = level);
|
|
7285
7309
|
}
|
|
7286
7310
|
let { npm_execpath } = process.env;
|
|
7287
|
-
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && logger.log(), logger.greet(` Rsbuild v1.4.
|
|
7311
|
+
(!npm_execpath || npm_execpath.includes('npx-cli.js') || npm_execpath.includes('.bun')) && logger.log(), logger.greet(` Rsbuild v1.4.1\n`);
|
|
7288
7312
|
try {
|
|
7289
7313
|
!function() {
|
|
7290
7314
|
let cli = ((name = "")=>new CAC(name))('rsbuild');
|
|
7291
|
-
cli.help(), cli.version("1.4.
|
|
7315
|
+
cli.help(), cli.version("1.4.1"), cli.option('--base <base>', 'specify the base path of the server').option('-c, --config <config>', 'specify the configuration file, can be a relative or absolute path').option('--config-loader <loader>', 'specify the loader to load the config file, can be `jiti` or `native`', {
|
|
7292
7316
|
default: 'jiti'
|
|
7293
7317
|
}).option('-r, --root <root>', 'specify the project root directory, can be an absolute path or a path relative to cwd').option('-m, --mode <mode>', 'specify the build mode, can be `development`, `production` or `none`').option('--log-level <level>', 'specify the log level, can be `info`, `warn`, `error` or `silent`').option('--env-mode <mode>', 'specify the env mode to load the `.env.[mode]` file').option('--environment <name>', 'specify the name of environment to build', {
|
|
7294
7318
|
type: [
|
|
@@ -7346,5 +7370,5 @@ async function runCLI() {
|
|
|
7346
7370
|
logger.error('Failed to start Rsbuild CLI.'), logger.error(err);
|
|
7347
7371
|
}
|
|
7348
7372
|
}
|
|
7349
|
-
let src_version = "1.4.
|
|
7373
|
+
let src_version = "1.4.1";
|
|
7350
7374
|
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig_loadConfig as loadConfig, loadEnv, logger, mergeRsbuildConfig, rspack, runCLI, src_version as version };
|
|
@@ -13,16 +13,15 @@ export declare const getRsbuildInspectConfig: ({ normalizedConfig, inspectOption
|
|
|
13
13
|
}>;
|
|
14
14
|
environmentConfigs: InspectConfigResult["origin"]["environmentConfigs"];
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type RawConfig = {
|
|
17
|
+
name: string;
|
|
18
|
+
content: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function outputInspectConfigFiles({ rawBundlerConfigs, rawEnvironmentConfigs, inspectOptions, rawExtraConfigs, configType, }: {
|
|
17
21
|
configType: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}>;
|
|
22
|
-
rawBundlerConfigs: Array<{
|
|
23
|
-
name: string;
|
|
24
|
-
content: string;
|
|
25
|
-
}>;
|
|
22
|
+
rawExtraConfigs?: RawConfig[];
|
|
23
|
+
rawEnvironmentConfigs: RawConfig[];
|
|
24
|
+
rawBundlerConfigs: RawConfig[];
|
|
26
25
|
inspectOptions: InspectConfigOptions & {
|
|
27
26
|
outputPath: string;
|
|
28
27
|
};
|
|
@@ -33,3 +32,4 @@ export declare function inspectConfig<B extends 'rspack' | 'webpack' = 'rspack'>
|
|
|
33
32
|
bundlerConfigs: B extends 'rspack' ? Rspack.Configuration[] : WebpackConfig[];
|
|
34
33
|
bundler?: 'rspack' | 'webpack';
|
|
35
34
|
}): Promise<InspectConfigResult<B>>;
|
|
35
|
+
export {};
|
|
@@ -163,14 +163,45 @@ export type ModifyChainUtils = {
|
|
|
163
163
|
* The value of `process.env.NODE_ENV`
|
|
164
164
|
*/
|
|
165
165
|
env: string;
|
|
166
|
+
/**
|
|
167
|
+
* A boolean value indicating whether this is a development build.
|
|
168
|
+
* Set to `true` when the `mode` is `development`.
|
|
169
|
+
*/
|
|
166
170
|
isDev: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* A boolean value indicating whether this is a production build.
|
|
173
|
+
* Set to `true` when the `mode` is `production`.
|
|
174
|
+
*/
|
|
167
175
|
isProd: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* The current build target.
|
|
178
|
+
*/
|
|
168
179
|
target: RsbuildTarget;
|
|
180
|
+
/**
|
|
181
|
+
* A boolean value indicating whether the build target is `node`.
|
|
182
|
+
* Equivalent to `target === 'node'`.
|
|
183
|
+
*/
|
|
169
184
|
isServer: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* A boolean value indicating whether the build target is `web-worker`.
|
|
187
|
+
* Equivalent to `target === 'web-worker'`.
|
|
188
|
+
*/
|
|
170
189
|
isWebWorker: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Predefined chain IDs.
|
|
192
|
+
*/
|
|
171
193
|
CHAIN_ID: ChainIdentifier;
|
|
194
|
+
/**
|
|
195
|
+
* The environment context for current build.
|
|
196
|
+
*/
|
|
172
197
|
environment: EnvironmentContext;
|
|
198
|
+
/**
|
|
199
|
+
* The Rspack instance, same as `import { rspack } from '@rsbuild/core'`.
|
|
200
|
+
*/
|
|
173
201
|
rspack: typeof rspack;
|
|
202
|
+
/**
|
|
203
|
+
* The default export of `html-rspack-plugin`.
|
|
204
|
+
*/
|
|
174
205
|
HtmlPlugin: typeof HtmlRspackPlugin;
|
|
175
206
|
};
|
|
176
207
|
interface PluginInstance {
|
|
@@ -85,6 +85,19 @@ export type InspectConfigOptions = {
|
|
|
85
85
|
* @default false
|
|
86
86
|
*/
|
|
87
87
|
writeToDisk?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Extra configurations to be output.
|
|
90
|
+
* - key: The name of the configuration
|
|
91
|
+
* - value: The configuration object
|
|
92
|
+
* @example
|
|
93
|
+
* extraConfigs: {
|
|
94
|
+
* // Output `rstest.config.mjs` file
|
|
95
|
+
* 'rstest': {
|
|
96
|
+
* // ...
|
|
97
|
+
* },
|
|
98
|
+
* }
|
|
99
|
+
*/
|
|
100
|
+
extraConfigs?: Record<string, unknown>;
|
|
88
101
|
};
|
|
89
102
|
export type InspectConfigResult<B extends 'rspack' | 'webpack' = 'rspack'> = {
|
|
90
103
|
rsbuildConfig: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "1.4.
|
|
49
|
+
"@rspack/core": "1.4.1",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
51
|
"@swc/helpers": "^0.5.17",
|
|
52
52
|
"core-js": "~3.43.0",
|
|
53
53
|
"jiti": "^2.4.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@rslib/core": "0.10.
|
|
56
|
+
"@rslib/core": "0.10.3",
|
|
57
57
|
"@types/connect": "3.4.38",
|
|
58
58
|
"@types/cors": "^2.8.19",
|
|
59
|
-
"@types/node": "^22.15.
|
|
59
|
+
"@types/node": "^22.15.33",
|
|
60
60
|
"@types/on-finished": "2.3.5",
|
|
61
61
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
62
62
|
"@types/ws": "^8.18.1",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"prebundle": "1.3.3",
|
|
83
83
|
"reduce-configs": "^1.1.0",
|
|
84
84
|
"rsbuild-dev-middleware": "0.3.0",
|
|
85
|
-
"rslog": "^1.2.
|
|
85
|
+
"rslog": "^1.2.8",
|
|
86
86
|
"rspack-chain": "^1.2.6",
|
|
87
87
|
"rspack-manifest-plugin": "5.0.3",
|
|
88
88
|
"sirv": "^3.0.1",
|