perf upgrade
This commit is contained in:
@@ -29,6 +29,7 @@ export function getRouter() {
|
||||
fullWidth: false,
|
||||
},
|
||||
defaultPreload: "intent",
|
||||
defaultPreloadStaleTime: 60_000,
|
||||
defaultErrorComponent: DefaultCatchBoundary,
|
||||
scrollRestoration: true,
|
||||
defaultViewTransition: false,
|
||||
|
||||
@@ -153,6 +153,9 @@ export const Route = createRootRouteWithContext<{
|
||||
function RootComponent() {
|
||||
React.useEffect(() => {
|
||||
ensureSuperTokensFrontend();
|
||||
if (import.meta.env.PROD && 'serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/sw.js').catch(() => {});
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user