vike 0.4.240-commit-a80417c → 0.4.240-commit-098ff81
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/dist/esm/client/runtime-client-routing/renderPageClientSide.js +8 -12
- package/dist/esm/client/runtime-client-routing/utils.d.ts +0 -1
- package/dist/esm/client/runtime-client-routing/utils.js +0 -1
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ export { getRenderCount };
|
|
|
3
3
|
export { disableClientRouting };
|
|
4
4
|
export { firstRenderStartPromise };
|
|
5
5
|
export { getPageContextClient };
|
|
6
|
-
import { assert,
|
|
6
|
+
import { assert, objectAssign, redirectHard, getGlobalObject, hasProp, updateType, genPromise, isCallable, catchInfiniteLoop, } from './utils.js';
|
|
7
7
|
import { getPageContextFromClientHooks, getPageContextFromServerHooks, getPageContextFromHooks_isHydration, getPageContextFromHooks_serialized, setPageContextInitIsPassedToClient, } from './getPageContextFromHooks.js';
|
|
8
8
|
import { createPageContextClientSide } from './createPageContextClientSide.js';
|
|
9
9
|
import { addLinkPrefetchHandlers, addLinkPrefetchHandlers_unwatch, addLinkPrefetchHandlers_watch, getPageContextPrefetched, populatePageContextPrefetchCache, } from './prefetch.js';
|
|
@@ -267,14 +267,12 @@ async function renderPageClientSide(renderArgs) {
|
|
|
267
267
|
}
|
|
268
268
|
async function renderErrorPage(pageContext, args, pageContextAbort) {
|
|
269
269
|
const onError = (err) => {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
console.error(err);
|
|
277
|
-
}
|
|
270
|
+
/* When we can't render the error page, we prefer showing a blank page over letting the server-side try because otherwise:
|
|
271
|
+
- We risk running into an infinite loop of reloads which would overload the server.
|
|
272
|
+
- An infinite reloading page is a even worse UX than a blank page.
|
|
273
|
+
redirectHard(urlOriginal)
|
|
274
|
+
*/
|
|
275
|
+
console.error(err);
|
|
278
276
|
};
|
|
279
277
|
const errorPageId = getErrorPageId(pageContext._pageFilesAll, pageContext._globalContext._pageConfigs);
|
|
280
278
|
if (!errorPageId)
|
|
@@ -386,9 +384,7 @@ async function renderPageClientSide(renderArgs) {
|
|
|
386
384
|
await handleError({ err });
|
|
387
385
|
}
|
|
388
386
|
else {
|
|
389
|
-
|
|
390
|
-
console.error(err);
|
|
391
|
-
}
|
|
387
|
+
console.error(err);
|
|
392
388
|
}
|
|
393
389
|
};
|
|
394
390
|
// We use globalObject.onRenderClientPreviousPromise in order to ensure that there is never two concurrent onRenderClient() calls
|
|
@@ -7,7 +7,6 @@ export * from '../../utils/isCallable.js';
|
|
|
7
7
|
export * from '../../utils/isObject.js';
|
|
8
8
|
export * from '../../utils/isPlainObject.js';
|
|
9
9
|
export * from '../../utils/isReact.js';
|
|
10
|
-
export * from '../../utils/isSameErrorMessage.js';
|
|
11
10
|
export * from '../../utils/objectAssign.js';
|
|
12
11
|
export * from '../../utils/parseUrl.js';
|
|
13
12
|
export * from '../../utils/PromiseType.js';
|
|
@@ -11,7 +11,6 @@ export * from '../../utils/isCallable.js';
|
|
|
11
11
|
export * from '../../utils/isObject.js';
|
|
12
12
|
export * from '../../utils/isPlainObject.js';
|
|
13
13
|
export * from '../../utils/isReact.js';
|
|
14
|
-
export * from '../../utils/isSameErrorMessage.js';
|
|
15
14
|
export * from '../../utils/objectAssign.js';
|
|
16
15
|
export * from '../../utils/parseUrl.js';
|
|
17
16
|
export * from '../../utils/PromiseType.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.240-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.240-commit-098ff81";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.240-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.240-commit-098ff81';
|