diff --git a/src/module.ts b/src/module.ts index e4a7987..71919e5 100644 --- a/src/module.ts +++ b/src/module.ts @@ -189,6 +189,13 @@ export default defineNuxtModule<GqlConfig>({ clientDocs, ...(typeof config.codegen !== 'boolean' && config.codegen) }).then(output => output.reduce<Record<string, string>>((acc, c) => ({ ...acc, [c.filename.split('.ts')[0]]: c.content }), {})) + .catch(e => { + if(nuxt.options.dev) { + console.error(e) + return {} + } + throw e + }) : ctx.clients!.reduce<Record<string, string>>((acc, k) => { if (!clientDocs?.[k]?.length) { return acc }