mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 22:14:29 +09:00
The only way I found to make it work is to deploy all functions again Was: <img width="1245" alt="image" src="https://github.com/webstudio-is/webstudio/assets/5077042/2ce88b6a-3bdd-4c58-b690-fa2f5b35cb18"> Now: <img width="1228" alt="image" src="https://github.com/webstudio-is/webstudio/assets/5077042/a90ee191-fb4b-4666-859f-502e06929099"> Any ideas why rest/ai so much smaller than all other routes?
27 lines
790 B
TypeScript
27 lines
790 B
TypeScript
import type { ServerRuntimeMetaFunction as MetaFunction } from "@remix-run/server-runtime";
|
|
import { Root } from "~/shared/remix/root";
|
|
import type { ShouldRevalidateFunction } from "@remix-run/react";
|
|
|
|
export const meta: MetaFunction = () => {
|
|
return [{ title: "Webstudio" }];
|
|
};
|
|
|
|
/**
|
|
* We do not want trpc and other mutations that use the Remix useFetcher hook
|
|
* to cause a reload of all builder data.
|
|
*/
|
|
export const shouldRevalidate: ShouldRevalidateFunction = ({
|
|
currentUrl,
|
|
nextUrl,
|
|
defaultShouldRevalidate,
|
|
}) => {
|
|
return currentUrl.href === nextUrl.href ? false : defaultShouldRevalidate;
|
|
};
|
|
|
|
export default Root;
|
|
|
|
// Reduces Vercel function size from 29MB to 9MB for unknown reasons; effective when used in limited files.
|
|
export const config = {
|
|
maxDuration: 30,
|
|
};
|