Configuration

Module options are supplied through the prismic property in your Nuxt config.

nuxt.config.ts
import { defineNuxtConfig } from 'nuxt3'

export default defineNuxtConfig({
    prismic: {
        /* configuration */
    },
});
Interface
type PrismicModuleOptions = PrismicPluginOptions & {
    client?: string;
    linkResolver?: string;
    richTextSerializer?: string;
    preview?: string | false;
    toolbar?: boolean;
}
Defaults
{
    client: '~/prismic/client', // `~/app/prismic/client` on Nuxt 3
    linkResolver: '~/prismic/linkResolver', // `~/app/prismic/linkResolver` on Nuxt 3
    richTextSerializer: '~/prismic/richTextSerializer', // `~/app/prismic/richTextSerializer` on Nuxt 3
    injectComponents: true,
    preview: '/preview',
    toolbar: true
}

Overview

KeyTypeDefaultDescription
...PrismicPluginOptionsobject{}Options provided to Prismic Vue plugin, see section below for more details.
clientstring~/prismic/client
(~/app/prismic/client on Nuxt 3)
Path to an optional file exporting an @prismicio/client instance for the module to use.
linkResolverstring~/prismic/linkResolver
(~/app/prismic/linkResolver on Nuxt 3)
Path to an optional file exporting a Link Resolver for the module to use.
richTextSerializerstring~/prismic/richTextSerializer
(~/app/prismic/richTextSerializer on Nuxt 3)
Path to an optional file exporting a HTML Serializer for the module to use.
previewstring | false/previewThe route to use for the preview page, disable previews with false.
toolbarbooleantrueWhether or not to inject Prismic toolbar, required for previews to work properly.
devtoolsbooleantrueWhether or not to enable the devtools UI.

...PrismicPluginOptions

This module is essentially a drop-in integration of @prismicio/vue plugin, fine-tuned for Nuxt. In that regard it inherits from most of @prismicio/vue options. Please refer to @prismicio/vue documentation to discover available options inherited from the plugin.

⚠  client, linkResolver, and richTextSerializer options are replaced, see above.