Skip to content

Instantly share code, notes, and snippets.

@j2is
Created July 18, 2021 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j2is/c1bda9ff7663c78ce443d0268751d0ca to your computer and use it in GitHub Desktop.
Save j2is/c1bda9ff7663c78ce443d0268751d0ca to your computer and use it in GitHub Desktop.
Next Sanity Config
export const config = {
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET || "production",
projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID,
apiVersion: "2021-03-25",
/**
* Set useCdn to `false` if your application require the freshest possible
* data always (potentially slightly slower and a bit more expensive).
* Authenticated request (like preview) will always bypass the CDN
**/
useCdn: process.env.NODE_ENV === "production",
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment