Custom Client
You can make the module use your own @prismicio/client
instance. To do so, export it from ~/prismic/client
(~/app/prismic/client
on Nuxt 3), it can be either a factory function or the custom client:
~/prismic/client.[jt
import { createClient } from '@prismicio/client'
export default () => {
// this will be run inside by a nuxt plugin. So you will have access to the nuxt instance inside of it.
return createClient('my-repository')
}
export default createClient('my-repository')
The default path (
~/prismic/client
, ~/app/prismic/client
on Nuxt 3) can be changed with the client
option. See the module configuration ->