@rsbuild/core 1.0.1-beta.3 → 1.0.1-beta.5
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/postcss-load-config/index.js +10 -10
- package/dist/client/hmr.js +5 -0
- package/dist/index.cjs +884 -637
- package/dist/index.js +898 -651
- package/dist/transformLoader.cjs +2 -1
- package/dist/transformRawLoader.cjs +2 -1
- package/dist-types/configChain.d.ts +2 -15
- package/dist-types/helpers.d.ts +0 -1
- package/dist-types/index.d.ts +1 -1
- package/dist-types/initHooks.d.ts +10 -7
- package/dist-types/initPlugins.d.ts +2 -2
- package/dist-types/loader/transformLoader.d.ts +5 -3
- package/dist-types/pluginManager.d.ts +6 -4
- package/dist-types/plugins/appIcon.d.ts +2 -0
- package/dist-types/plugins/html.d.ts +1 -1
- package/dist-types/server/devMiddleware.d.ts +2 -14
- package/dist-types/server/socketServer.d.ts +7 -3
- package/dist-types/types/config/index.d.ts +4 -4
- package/dist-types/types/config/output.d.ts +8 -4
- package/dist-types/types/context.d.ts +6 -2
- package/dist-types/types/hooks.d.ts +7 -1
- package/dist-types/types/plugin.d.ts +99 -10
- package/dist-types/types/thirdParty.d.ts +15 -2
- package/package.json +2 -2
- package/dist-types/rspack/HtmlAppIconPlugin.d.ts +0 -13
- package/dist-types/rspack/InlineChunkHtmlPlugin.d.ts +0 -29
|
@@ -367,12 +367,12 @@
|
|
|
367
367
|
};
|
|
368
368
|
};
|
|
369
369
|
},
|
|
370
|
-
|
|
370
|
+
631: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
371
371
|
const { resolve } = __nccwpck_require__(411);
|
|
372
372
|
const config = __nccwpck_require__(882);
|
|
373
|
-
const loadOptions = __nccwpck_require__(
|
|
374
|
-
const loadPlugins = __nccwpck_require__(
|
|
375
|
-
const req = __nccwpck_require__(
|
|
373
|
+
const loadOptions = __nccwpck_require__(349);
|
|
374
|
+
const loadPlugins = __nccwpck_require__(692);
|
|
375
|
+
const req = __nccwpck_require__(634);
|
|
376
376
|
const interopRequireDefault = (obj) =>
|
|
377
377
|
obj && obj.__esModule ? obj : { default: obj };
|
|
378
378
|
async function processResult(ctx, result) {
|
|
@@ -486,8 +486,8 @@
|
|
|
486
486
|
* @requires ./plugins
|
|
487
487
|
*/ module.exports = rc;
|
|
488
488
|
},
|
|
489
|
-
|
|
490
|
-
const req = __nccwpck_require__(
|
|
489
|
+
349: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
490
|
+
const req = __nccwpck_require__(634);
|
|
491
491
|
async function options(config, file) {
|
|
492
492
|
if (config.parser && typeof config.parser === "string") {
|
|
493
493
|
try {
|
|
@@ -520,8 +520,8 @@
|
|
|
520
520
|
}
|
|
521
521
|
module.exports = options;
|
|
522
522
|
},
|
|
523
|
-
|
|
524
|
-
const req = __nccwpck_require__(
|
|
523
|
+
692: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
524
|
+
const req = __nccwpck_require__(634);
|
|
525
525
|
async function load(plugin, options, file) {
|
|
526
526
|
try {
|
|
527
527
|
if (
|
|
@@ -576,7 +576,7 @@
|
|
|
576
576
|
}
|
|
577
577
|
module.exports = plugins;
|
|
578
578
|
},
|
|
579
|
-
|
|
579
|
+
634: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
580
580
|
const { createRequire } = __nccwpck_require__(33);
|
|
581
581
|
const { pathToFileURL } = __nccwpck_require__(41);
|
|
582
582
|
const TS_EXT_RE = /\.[mc]?ts$/;
|
|
@@ -746,6 +746,6 @@
|
|
|
746
746
|
})();
|
|
747
747
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
748
748
|
__nccwpck_require__.ab = __dirname + "/";
|
|
749
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
749
|
+
var __webpack_exports__ = __nccwpck_require__(631);
|
|
750
750
|
module.exports = __webpack_exports__;
|
|
751
751
|
})();
|
package/dist/client/hmr.js
CHANGED
|
@@ -67,6 +67,7 @@ function formatStatsMessages(stats, verbose) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// src/client/hmr.ts
|
|
70
|
+
var compilationName = RSBUILD_COMPILATION_NAME;
|
|
70
71
|
function formatURL({ port, protocol, hostname, pathname }) {
|
|
71
72
|
if (typeof URL !== "undefined") {
|
|
72
73
|
const url = new URL("http://localhost");
|
|
@@ -74,6 +75,7 @@ function formatURL({ port, protocol, hostname, pathname }) {
|
|
|
74
75
|
url.hostname = hostname;
|
|
75
76
|
url.protocol = protocol;
|
|
76
77
|
url.pathname = pathname;
|
|
78
|
+
url.searchParams.append("compilationName", compilationName);
|
|
77
79
|
return url.toString();
|
|
78
80
|
}
|
|
79
81
|
const colon = protocol.indexOf(":") === -1 ? ":" : "";
|
|
@@ -188,6 +190,9 @@ function onOpen() {
|
|
|
188
190
|
}
|
|
189
191
|
function onMessage(e) {
|
|
190
192
|
const message = JSON.parse(e.data);
|
|
193
|
+
if (message.compilationName && message.compilationName !== compilationName) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
191
196
|
switch (message.type) {
|
|
192
197
|
case "hash":
|
|
193
198
|
lastCompilationHash = message.data;
|