@rsbuild/core 1.4.12 → 1.4.13
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/launch-editor-middleware/index.js +32 -21
- package/compiled/launch-editor-middleware/package.json +1 -1
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rsbuild-dev-middleware/index.js +25 -25
- package/compiled/style-loader/index.js +10 -10
- package/dist/client/hmr.js +8 -1
- package/dist/index.cjs +65 -64
- package/dist/index.js +65 -64
- package/dist-types/constants.d.ts +1 -0
- package/dist-types/rspack-plugins/RsbuildHtmlPlugin.d.ts +1 -0
- package/dist-types/server/compilationMiddleware.d.ts +0 -4
- package/dist-types/server/devServer.d.ts +7 -2
- package/dist-types/server/socketServer.d.ts +24 -7
- package/dist-types/types/config.d.ts +12 -3
- package/package.json +5 -5
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
6709: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4
4
|
"use strict";
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
5
|
+
const loader = __nccwpck_require__(7647);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
module.exports.defaultGetLocalIdent =
|
|
8
|
-
__nccwpck_require__(
|
|
8
|
+
__nccwpck_require__(9082).defaultGetLocalIdent;
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
7647: (__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__(7716);
|
|
16
|
+
var _utils = __nccwpck_require__(9082);
|
|
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
|
+
7716: (__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__(7743),
|
|
262
262
|
);
|
|
263
263
|
var _postcssIcssParser = _interopRequireDefault(
|
|
264
|
-
__nccwpck_require__(
|
|
264
|
+
__nccwpck_require__(1986),
|
|
265
265
|
);
|
|
266
|
-
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(
|
|
266
|
+
var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6677));
|
|
267
267
|
function _interopRequireDefault(obj) {
|
|
268
268
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
|
-
|
|
271
|
+
1986: (__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__(9082);
|
|
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
|
+
7743: (__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__(9082);
|
|
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
|
+
6677: (__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__(9082);
|
|
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
|
+
9082: (__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__(6709);
|
|
8102
8102
|
module.exports = __webpack_exports__;
|
|
8103
8103
|
})();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
4
|
-
const url = __nccwpck_require__(16);
|
|
3
|
+
814: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
4
|
const path = __nccwpck_require__(928);
|
|
6
|
-
const launch = __nccwpck_require__(
|
|
5
|
+
const launch = __nccwpck_require__(586);
|
|
7
6
|
module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
|
|
8
7
|
if (typeof specifiedEditor === "function") {
|
|
9
8
|
onErrorCallback = specifiedEditor;
|
|
@@ -15,24 +14,31 @@
|
|
|
15
14
|
}
|
|
16
15
|
srcRoot = srcRoot || process.cwd();
|
|
17
16
|
return function launchEditorMiddleware(req, res) {
|
|
18
|
-
|
|
17
|
+
let url;
|
|
18
|
+
try {
|
|
19
|
+
url = new URL(req.url);
|
|
20
|
+
} catch (_err) {
|
|
21
|
+
res.statusCode = 500;
|
|
22
|
+
res.end(`launch-editor-middleware: invalid URL.`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const file = url.searchParams.get("file");
|
|
19
26
|
if (!file) {
|
|
20
27
|
res.statusCode = 500;
|
|
21
28
|
res.end(
|
|
22
29
|
`launch-editor-middleware: required query param "file" is missing.`,
|
|
23
30
|
);
|
|
24
31
|
} else {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
);
|
|
32
|
+
const resolved = file.startsWith("file://")
|
|
33
|
+
? file
|
|
34
|
+
: path.resolve(srcRoot, file);
|
|
35
|
+
launch(resolved, specifiedEditor, onErrorCallback);
|
|
30
36
|
res.end();
|
|
31
37
|
}
|
|
32
38
|
};
|
|
33
39
|
};
|
|
34
40
|
},
|
|
35
|
-
|
|
41
|
+
575: (module) => {
|
|
36
42
|
module.exports = {
|
|
37
43
|
atom: "atom",
|
|
38
44
|
Brackets: "brackets",
|
|
@@ -40,6 +46,7 @@
|
|
|
40
46
|
code: "code",
|
|
41
47
|
vscodium: "vscodium",
|
|
42
48
|
codium: "codium",
|
|
49
|
+
trae: "trae",
|
|
43
50
|
emacs: "emacs",
|
|
44
51
|
gvim: "gvim",
|
|
45
52
|
idea: "idea",
|
|
@@ -58,9 +65,10 @@
|
|
|
58
65
|
"goland.sh": "goland",
|
|
59
66
|
rider: "rider",
|
|
60
67
|
"rider.sh": "rider",
|
|
68
|
+
zed: "zed",
|
|
61
69
|
};
|
|
62
70
|
},
|
|
63
|
-
|
|
71
|
+
780: (module) => {
|
|
64
72
|
module.exports = {
|
|
65
73
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
66
74
|
"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta":
|
|
@@ -79,6 +87,7 @@
|
|
|
79
87
|
"code-insiders",
|
|
80
88
|
"/Applications/VSCodium.app/Contents/MacOS/Electron": "codium",
|
|
81
89
|
"/Applications/Cursor.app/Contents/MacOS/Cursor": "cursor",
|
|
90
|
+
"/Applications/Trae.app/Contents/MacOS/Electron": "trae",
|
|
82
91
|
"/Applications/AppCode.app/Contents/MacOS/appcode":
|
|
83
92
|
"/Applications/AppCode.app/Contents/MacOS/appcode",
|
|
84
93
|
"/Applications/CLion.app/Contents/MacOS/clion":
|
|
@@ -107,7 +116,7 @@
|
|
|
107
116
|
"/Applications/Zed.app/Contents/MacOS/zed": "zed",
|
|
108
117
|
};
|
|
109
118
|
},
|
|
110
|
-
|
|
119
|
+
708: (module) => {
|
|
111
120
|
module.exports = [
|
|
112
121
|
"Brackets.exe",
|
|
113
122
|
"Code.exe",
|
|
@@ -133,9 +142,10 @@
|
|
|
133
142
|
"goland64.exe",
|
|
134
143
|
"rider.exe",
|
|
135
144
|
"rider64.exe",
|
|
145
|
+
"trae.exe",
|
|
136
146
|
];
|
|
137
147
|
},
|
|
138
|
-
|
|
148
|
+
118: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
139
149
|
const path = __nccwpck_require__(928);
|
|
140
150
|
module.exports = function getArgumentsForPosition(
|
|
141
151
|
editor,
|
|
@@ -177,6 +187,7 @@
|
|
|
177
187
|
case "code-insiders":
|
|
178
188
|
case "Code - Insiders":
|
|
179
189
|
case "codium":
|
|
190
|
+
case "trae":
|
|
180
191
|
case "cursor":
|
|
181
192
|
case "vscodium":
|
|
182
193
|
case "VSCodium":
|
|
@@ -206,13 +217,13 @@
|
|
|
206
217
|
return [fileName];
|
|
207
218
|
};
|
|
208
219
|
},
|
|
209
|
-
|
|
220
|
+
191: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
210
221
|
const path = __nccwpck_require__(928);
|
|
211
222
|
const shellQuote = __nccwpck_require__(710);
|
|
212
223
|
const childProcess = __nccwpck_require__(317);
|
|
213
|
-
const COMMON_EDITORS_MACOS = __nccwpck_require__(
|
|
214
|
-
const COMMON_EDITORS_LINUX = __nccwpck_require__(
|
|
215
|
-
const COMMON_EDITORS_WIN = __nccwpck_require__(
|
|
224
|
+
const COMMON_EDITORS_MACOS = __nccwpck_require__(780);
|
|
225
|
+
const COMMON_EDITORS_LINUX = __nccwpck_require__(575);
|
|
226
|
+
const COMMON_EDITORS_WIN = __nccwpck_require__(708);
|
|
216
227
|
module.exports = function guessEditor(specifiedEditor) {
|
|
217
228
|
if (specifiedEditor) {
|
|
218
229
|
return shellQuote.parse(specifiedEditor);
|
|
@@ -292,14 +303,14 @@
|
|
|
292
303
|
return [null];
|
|
293
304
|
};
|
|
294
305
|
},
|
|
295
|
-
|
|
306
|
+
586: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
296
307
|
const fs = __nccwpck_require__(896);
|
|
297
308
|
const os = __nccwpck_require__(857);
|
|
298
309
|
const path = __nccwpck_require__(928);
|
|
299
310
|
const colors = __nccwpck_require__(717);
|
|
300
311
|
const childProcess = __nccwpck_require__(317);
|
|
301
|
-
const guessEditor = __nccwpck_require__(
|
|
302
|
-
const getArgumentsForPosition = __nccwpck_require__(
|
|
312
|
+
const guessEditor = __nccwpck_require__(191);
|
|
313
|
+
const getArgumentsForPosition = __nccwpck_require__(118);
|
|
303
314
|
function wrapErrorCallback(cb) {
|
|
304
315
|
return (fileName, errorMessage) => {
|
|
305
316
|
console.log();
|
|
@@ -699,6 +710,6 @@
|
|
|
699
710
|
}
|
|
700
711
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
701
712
|
__nccwpck_require__.ab = __dirname + "/";
|
|
702
|
-
var __webpack_exports__ = __nccwpck_require__(
|
|
713
|
+
var __webpack_exports__ = __nccwpck_require__(814);
|
|
703
714
|
module.exports = __webpack_exports__;
|
|
704
715
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"launch-editor-middleware","author":"Evan You","version":"2.
|
|
1
|
+
{"name":"launch-editor-middleware","author":"Evan You","version":"2.11.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
module.exports = __nccwpck_require__(
|
|
4
|
+
42: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
module.exports = __nccwpck_require__(592)["default"];
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
592: (__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__(305);
|
|
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
|
+
305: (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__(42);
|
|
720
720
|
module.exports = __webpack_exports__;
|
|
721
721
|
})();
|
|
@@ -4439,15 +4439,15 @@
|
|
|
4439
4439
|
return a.start - b.start;
|
|
4440
4440
|
}
|
|
4441
4441
|
},
|
|
4442
|
-
|
|
4442
|
+
9409: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4443
4443
|
"use strict";
|
|
4444
4444
|
const { logger } = __nccwpck_require__(8679);
|
|
4445
|
-
const middleware = __nccwpck_require__(
|
|
4446
|
-
const getFilenameFromUrl = __nccwpck_require__(
|
|
4447
|
-
const setupHooks = __nccwpck_require__(
|
|
4448
|
-
const setupWriteToDisk = __nccwpck_require__(
|
|
4449
|
-
const setupOutputFileSystem = __nccwpck_require__(
|
|
4450
|
-
const ready = __nccwpck_require__(
|
|
4445
|
+
const middleware = __nccwpck_require__(893);
|
|
4446
|
+
const getFilenameFromUrl = __nccwpck_require__(333);
|
|
4447
|
+
const setupHooks = __nccwpck_require__(1792);
|
|
4448
|
+
const setupWriteToDisk = __nccwpck_require__(5691);
|
|
4449
|
+
const setupOutputFileSystem = __nccwpck_require__(272);
|
|
4450
|
+
const ready = __nccwpck_require__(380);
|
|
4451
4451
|
const noop = () => {};
|
|
4452
4452
|
function wdm(compiler, options = {}) {
|
|
4453
4453
|
const context = {
|
|
@@ -4512,15 +4512,15 @@
|
|
|
4512
4512
|
}
|
|
4513
4513
|
module.exports = wdm;
|
|
4514
4514
|
},
|
|
4515
|
-
|
|
4515
|
+
893: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4516
4516
|
"use strict";
|
|
4517
4517
|
const mrmime = __nccwpck_require__(8311);
|
|
4518
4518
|
const { logger } = __nccwpck_require__(8679);
|
|
4519
4519
|
const onFinishedStream = __nccwpck_require__(21);
|
|
4520
|
-
const getFilenameFromUrl = __nccwpck_require__(
|
|
4521
|
-
const ready = __nccwpck_require__(
|
|
4522
|
-
const parseTokenList = __nccwpck_require__(
|
|
4523
|
-
const memorize = __nccwpck_require__(
|
|
4520
|
+
const getFilenameFromUrl = __nccwpck_require__(333);
|
|
4521
|
+
const ready = __nccwpck_require__(380);
|
|
4522
|
+
const parseTokenList = __nccwpck_require__(4955);
|
|
4523
|
+
const memorize = __nccwpck_require__(4917);
|
|
4524
4524
|
async function getEtag(stat) {
|
|
4525
4525
|
const mtime = stat.mtime.getTime().toString(16);
|
|
4526
4526
|
const size = stat.size.toString(16);
|
|
@@ -4612,7 +4612,7 @@
|
|
|
4612
4612
|
return;
|
|
4613
4613
|
}
|
|
4614
4614
|
function sendError(status, options) {
|
|
4615
|
-
const escapeHtml = __nccwpck_require__(
|
|
4615
|
+
const escapeHtml = __nccwpck_require__(6849);
|
|
4616
4616
|
const content = statuses[status] || String(status);
|
|
4617
4617
|
const document = Buffer.from(
|
|
4618
4618
|
`<!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>`,
|
|
@@ -4921,7 +4921,7 @@
|
|
|
4921
4921
|
}
|
|
4922
4922
|
module.exports = wrapper;
|
|
4923
4923
|
},
|
|
4924
|
-
|
|
4924
|
+
6849: (module) => {
|
|
4925
4925
|
"use strict";
|
|
4926
4926
|
const matchHtmlRegExp = /["'&<>]/;
|
|
4927
4927
|
function escapeHtml(string) {
|
|
@@ -4966,13 +4966,13 @@
|
|
|
4966
4966
|
}
|
|
4967
4967
|
module.exports = escapeHtml;
|
|
4968
4968
|
},
|
|
4969
|
-
|
|
4969
|
+
333: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
4970
4970
|
"use strict";
|
|
4971
4971
|
const path = __nccwpck_require__(6928);
|
|
4972
4972
|
const { parse } = __nccwpck_require__(7016);
|
|
4973
4973
|
const querystring = __nccwpck_require__(3480);
|
|
4974
|
-
const getPaths = __nccwpck_require__(
|
|
4975
|
-
const memorize = __nccwpck_require__(
|
|
4974
|
+
const getPaths = __nccwpck_require__(5367);
|
|
4975
|
+
const memorize = __nccwpck_require__(4917);
|
|
4976
4976
|
const memoizedParse = memorize(parse, undefined, (value) => {
|
|
4977
4977
|
if (value.pathname) {
|
|
4978
4978
|
value.pathname = decode(value.pathname);
|
|
@@ -5055,7 +5055,7 @@
|
|
|
5055
5055
|
}
|
|
5056
5056
|
module.exports = getFilenameFromUrl;
|
|
5057
5057
|
},
|
|
5058
|
-
|
|
5058
|
+
5367: (module) => {
|
|
5059
5059
|
"use strict";
|
|
5060
5060
|
function getPaths(context) {
|
|
5061
5061
|
const { stats, options } = context;
|
|
@@ -5076,7 +5076,7 @@
|
|
|
5076
5076
|
}
|
|
5077
5077
|
module.exports = getPaths;
|
|
5078
5078
|
},
|
|
5079
|
-
|
|
5079
|
+
4917: (module) => {
|
|
5080
5080
|
"use strict";
|
|
5081
5081
|
const cacheStore = new WeakMap();
|
|
5082
5082
|
function memorize(fn, { cache = new Map() } = {}, callback) {
|
|
@@ -5098,7 +5098,7 @@
|
|
|
5098
5098
|
}
|
|
5099
5099
|
module.exports = memorize;
|
|
5100
5100
|
},
|
|
5101
|
-
|
|
5101
|
+
4955: (module) => {
|
|
5102
5102
|
"use strict";
|
|
5103
5103
|
function parseTokenList(str) {
|
|
5104
5104
|
let end = 0;
|
|
@@ -5131,7 +5131,7 @@
|
|
|
5131
5131
|
}
|
|
5132
5132
|
module.exports = parseTokenList;
|
|
5133
5133
|
},
|
|
5134
|
-
|
|
5134
|
+
380: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5135
5135
|
"use strict";
|
|
5136
5136
|
const { logger } = __nccwpck_require__(8679);
|
|
5137
5137
|
function ready(context, callback, req) {
|
|
@@ -5147,7 +5147,7 @@
|
|
|
5147
5147
|
}
|
|
5148
5148
|
module.exports = ready;
|
|
5149
5149
|
},
|
|
5150
|
-
|
|
5150
|
+
1792: (module) => {
|
|
5151
5151
|
"use strict";
|
|
5152
5152
|
function setupHooks(context) {
|
|
5153
5153
|
function invalid() {
|
|
@@ -5175,7 +5175,7 @@
|
|
|
5175
5175
|
}
|
|
5176
5176
|
module.exports = setupHooks;
|
|
5177
5177
|
},
|
|
5178
|
-
|
|
5178
|
+
272: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5179
5179
|
"use strict";
|
|
5180
5180
|
const memfs = __nccwpck_require__(8672);
|
|
5181
5181
|
function setupOutputFileSystem(context) {
|
|
@@ -5202,7 +5202,7 @@
|
|
|
5202
5202
|
}
|
|
5203
5203
|
module.exports = setupOutputFileSystem;
|
|
5204
5204
|
},
|
|
5205
|
-
|
|
5205
|
+
5691: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5206
5206
|
"use strict";
|
|
5207
5207
|
const fs = __nccwpck_require__(9896);
|
|
5208
5208
|
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__(9409);
|
|
6199
6199
|
module.exports = __webpack_exports__;
|
|
6200
6200
|
})();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
|
-
|
|
5
|
-
const loader = __nccwpck_require__(
|
|
4
|
+
368: (module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5
|
+
const loader = __nccwpck_require__(238);
|
|
6
6
|
module.exports = loader.default;
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
238: (__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__(695);
|
|
13
|
+
var _options = _interopRequireDefault(__nccwpck_require__(771));
|
|
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
|
+
425: (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
|
+
695: (__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__(425));
|
|
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
|
+
771: (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__(368);
|
|
426
426
|
module.exports = __webpack_exports__;
|
|
427
427
|
})();
|
package/dist/client/hmr.js
CHANGED
|
@@ -19,7 +19,7 @@ function formatURL(config) {
|
|
|
19
19
|
return `${protocol}${colon}//${hostname}:${port}${pathname}?token=${RSBUILD_WEB_SOCKET_TOKEN}`;
|
|
20
20
|
}
|
|
21
21
|
let isFirstCompilation = true;
|
|
22
|
-
let lastCompilationHash
|
|
22
|
+
let lastCompilationHash;
|
|
23
23
|
let hasCompileErrors = false;
|
|
24
24
|
function clearOutdatedErrors() {
|
|
25
25
|
if (console.clear && hasCompileErrors) console.clear();
|
|
@@ -85,8 +85,14 @@ function tryApplyUpdates() {
|
|
|
85
85
|
}
|
|
86
86
|
let connection = null;
|
|
87
87
|
let reconnectCount = 0;
|
|
88
|
+
let pingIntervalId;
|
|
88
89
|
function onOpen() {
|
|
89
90
|
console.info('[HMR] connected.');
|
|
91
|
+
pingIntervalId = setInterval(()=>{
|
|
92
|
+
if (connection && connection.readyState === connection.OPEN) connection.send(JSON.stringify({
|
|
93
|
+
type: 'ping'
|
|
94
|
+
}));
|
|
95
|
+
}, 30000);
|
|
90
96
|
}
|
|
91
97
|
function onMessage(e) {
|
|
92
98
|
const message = JSON.parse(e.data);
|
|
@@ -139,6 +145,7 @@ function connect() {
|
|
|
139
145
|
if (!fallback) connection.addEventListener('error', onError);
|
|
140
146
|
}
|
|
141
147
|
function removeListeners() {
|
|
148
|
+
clearInterval(pingIntervalId);
|
|
142
149
|
if (connection) {
|
|
143
150
|
connection.removeEventListener('open', onOpen);
|
|
144
151
|
connection.removeEventListener('close', onClose);
|