@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.
@@ -367,12 +367,12 @@
367
367
  };
368
368
  };
369
369
  },
370
- 510: (module, __unused_webpack_exports, __nccwpck_require__) => {
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__(703);
374
- const loadPlugins = __nccwpck_require__(547);
375
- const req = __nccwpck_require__(915);
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
- 703: (module, __unused_webpack_exports, __nccwpck_require__) => {
490
- const req = __nccwpck_require__(915);
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
- 547: (module, __unused_webpack_exports, __nccwpck_require__) => {
524
- const req = __nccwpck_require__(915);
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
- 915: (module, __unused_webpack_exports, __nccwpck_require__) => {
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__(510);
749
+ var __webpack_exports__ = __nccwpck_require__(631);
750
750
  module.exports = __webpack_exports__;
751
751
  })();
@@ -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;