1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 14:46:37 -04:00

validate environment variables at build time

This commit is contained in:
2025-04-09 09:11:18 -04:00
parent 84702aeab1
commit eb92e54fd6
23 changed files with 150 additions and 60 deletions

View File

@ -1,6 +1,6 @@
import { connection } from "next/server";
import CountUp from "../../../components/CountUp";
import redis from "../../../lib/helpers/redis";
import redis from "../../../lib/redis";
import { siteLocale } from "../../../lib/config";
const HitCounter = async ({ slug }: { slug: string }) => {

View File

@ -1,3 +1,4 @@
import { env } from "../../../lib/env";
import { Suspense } from "react";
import { JsonLd } from "react-schemaorg";
import { CalendarIcon, TagIcon, SquarePenIcon, EyeIcon } from "lucide-react";
@ -20,7 +21,6 @@ import styles from "./page.module.css";
export const dynamicParams = false;
// https://nextjs.org/docs/app/building-your-application/rendering/partial-prerendering#using-partial-prerendering
// eslint-disable-next-line camelcase
export const experimental_ppr = true;
export const generateStaticParams = async () => {
@ -122,7 +122,7 @@ const Page = async ({ params }: { params: Promise<{ slug: string }> }) => {
</div>
{/* only count hits on production site */}
{process.env.NEXT_PUBLIC_VERCEL_ENV !== "development" && process.env.NODE_ENV !== "development" ? (
{env.VERCEL_ENV === "production" ? (
<div
className={styles.metaItem}
style={{