Skip to content

Commit

Permalink
feat: prepare nextjs starter template for live mode
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonGriggs committed Oct 18, 2024
1 parent 01d0313 commit 644d1df
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ export const client = createClient({
})
`

const live = `import { defineLive } from "next-sanity";
import { client } from './client'
export const { sanityFetch, SanityLive } = defineLive({ client });
`

const imageTS = `import createImageUrlBuilder from '@sanity/image-url'
import { SanityImageSource } from "@sanity/image-url/lib/types/types";
Expand Down Expand Up @@ -201,6 +207,7 @@ export const sanityFolder = (
'env.': useTypeScript ? envTS : envJS,
'lib': {
'client.': client,
'live.': live,
'image.': useTypeScript ? imageTS : imageJS,
},
}
Expand Down

0 comments on commit 644d1df

Please sign in to comment.