Skip to content

Commit aab0d0c

Browse files
committed
update for vercel previews
1 parent fbb7a3e commit aab0d0c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/codingcatdev/src/lib/server/content.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { env } from '$env/dynamic/private';
55
const LIMIT = 20;
66

77
// Force PREVIEW off by setting false in .env
8-
const preview = env.PREVIEW === "false" ? false : import.meta.env.DEV;
8+
// Will show for vercel previews unless forced to false
9+
const preview = env.PREVIEW === "false" ? false : env.VERCEL_ENV === "preview" || import.meta.env.DEV;
910

1011
export const parseModules = async (modules: Record<string, () => Promise<unknown>>) => {
1112
const contentList: Content[] = [];

0 commit comments

Comments
 (0)