Skip to content

Commit

Permalink
feat: adds proper ModuleOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
SebbeJohansson committed Feb 4, 2023
1 parent 964ffa3 commit c65cf2f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ import {
createResolver
} from "@nuxt/kit";

export default defineNuxtModule({
export interface ModuleOptions {
accessToken: string,
usePlugin: boolean,
bridge: boolean, // storyblok bridge on/off
apiOptions: any, // storyblok-js-client options
useApiClient: boolean,
}

export default defineNuxtModule<ModuleOptions>({
meta: {
name: "@storyblok/nuxt",
configKey: "storyblok"
},
defaults: {
usePlugin: true
accessToken: '',
usePlugin: true,
bridge: true,
apiOptions: {},
useApiClient: false,
},
setup(options, nuxt) {
const resolver = createResolver(import.meta.url);
Expand Down

0 comments on commit c65cf2f

Please sign in to comment.