@jsenv/core 41.4.2 → 41.4.3
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.
|
@@ -11239,9 +11239,20 @@ const devServerPluginServeSourceFiles = ({
|
|
|
11239
11239
|
// dependency: the file re-requested did not change, one below
|
|
11240
11240
|
// it did), so isValid() alone cannot catch this.
|
|
11241
11241
|
!request.searchParams.has("hot") &&
|
|
11242
|
+
// ...and the mirror guard: content cooked UNDER a "?hot" request
|
|
11243
|
+
// carries "?hot" in its rewritten references, and is correct for
|
|
11244
|
+
// that request only. Served from memory to a normal request (a
|
|
11245
|
+
// fresh tab), the browser would then load "file.js" from one
|
|
11246
|
+
// importer and "file.js?hot=..." from another — the same module
|
|
11247
|
+
// evaluated twice, which breaks anything module-level (e.g. a
|
|
11248
|
+
// signal registry throwing on duplicate ids). Re-cooking under
|
|
11249
|
+
// the normal request rewrites the references clean.
|
|
11250
|
+
!urlInfo.contentCookedForHotRequest &&
|
|
11242
11251
|
urlInfo.isValid();
|
|
11243
11252
|
if (!servableFromMemory) {
|
|
11244
11253
|
await urlInfo.cook({ request, reference });
|
|
11254
|
+
urlInfo.contentCookedForHotRequest =
|
|
11255
|
+
request.searchParams.has("hot");
|
|
11245
11256
|
}
|
|
11246
11257
|
let { response } = urlInfo;
|
|
11247
11258
|
if (response) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "41.4.
|
|
3
|
+
"version": "41.4.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Tool to develop, test and build js projects",
|
|
6
6
|
"repository": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@jsenv/plugin-minification": "1.7.5",
|
|
79
79
|
"@jsenv/plugin-supervisor": "1.8.8",
|
|
80
80
|
"@jsenv/plugin-transpilation": "1.5.78",
|
|
81
|
-
"@jsenv/server": "17.
|
|
81
|
+
"@jsenv/server": "17.6.0",
|
|
82
82
|
"@jsenv/sourcemap": "1.4.2",
|
|
83
83
|
"react-table": "7.8.0"
|
|
84
84
|
},
|
|
@@ -318,9 +318,20 @@ export const devServerPluginServeSourceFiles = ({
|
|
|
318
318
|
// dependency: the file re-requested did not change, one below
|
|
319
319
|
// it did), so isValid() alone cannot catch this.
|
|
320
320
|
!request.searchParams.has("hot") &&
|
|
321
|
+
// ...and the mirror guard: content cooked UNDER a "?hot" request
|
|
322
|
+
// carries "?hot" in its rewritten references, and is correct for
|
|
323
|
+
// that request only. Served from memory to a normal request (a
|
|
324
|
+
// fresh tab), the browser would then load "file.js" from one
|
|
325
|
+
// importer and "file.js?hot=..." from another — the same module
|
|
326
|
+
// evaluated twice, which breaks anything module-level (e.g. a
|
|
327
|
+
// signal registry throwing on duplicate ids). Re-cooking under
|
|
328
|
+
// the normal request rewrites the references clean.
|
|
329
|
+
!urlInfo.contentCookedForHotRequest &&
|
|
321
330
|
urlInfo.isValid();
|
|
322
331
|
if (!servableFromMemory) {
|
|
323
332
|
await urlInfo.cook({ request, reference });
|
|
333
|
+
urlInfo.contentCookedForHotRequest =
|
|
334
|
+
request.searchParams.has("hot");
|
|
324
335
|
}
|
|
325
336
|
let { response } = urlInfo;
|
|
326
337
|
if (response) {
|