svrjs-nextjs-website/sanity.cli.ts

13 lines
356 B
TypeScript
Raw Normal View History

import { loadEnvConfig } from "@next/env";
2024-09-07 14:59:43 +02:00
import { defineCliConfig } from "sanity/cli";
const dev = process.env.NODE_ENV !== "production";
loadEnvConfig(__dirname, dev, { info: () => null, error: console.error });
2024-09-07 14:59:43 +02:00
export default defineCliConfig({
api: {
projectId: `${process.env.NEXT_PUBLIC_SANITY_PROJECT_ID}`,
dataset: "production"
}
});