@pylonsync/functions 0.3.326 → 0.3.327
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/package.json
CHANGED
|
@@ -483,6 +483,10 @@ function preloadChunks(routeInfo) {
|
|
|
483
483
|
const prefix = routeInfo.public_prefix || "/_pylon/build/";
|
|
484
484
|
const all = [routeInfo.file, ...(routeInfo.imports || [])];
|
|
485
485
|
for (const c of all) {
|
|
486
|
+
// prefetch() passes file: "" (HTML-only prefetch has no route entry);
|
|
487
|
+
// an empty name would modulepreload the bare prefix ("/_pylon/build/")
|
|
488
|
+
// and the host answers that with a 400 on every page load.
|
|
489
|
+
if (!c) continue;
|
|
486
490
|
if (prefetchedChunks.has(c)) continue;
|
|
487
491
|
prefetchedChunks.add(c);
|
|
488
492
|
const link = document.createElement("link");
|