Skip to content

Commit

Permalink
fix: ignore exporting type if it is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Apr 25, 2024
1 parent f9f7dfd commit c308cc5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ import type { ${moduleImports.join(', ')} } from './module'
${appShims.length ? `declare module '#app' {\n${appShims.join('\n')}\n}\n` : ''}
${schemaShims.length ? `declare module '@nuxt/schema' {\n${schemaShims.join('\n')}\n}\n` : ''}
${schemaShims.length ? `declare module 'nuxt/schema' {\n${schemaShims.join('\n')}\n}\n` : ''}
export type { ${typeExports[0].names.join(', ')} } from './module'
${typeExports[0] ? `\nexport type { ${typeExports[0].names.join(', ')} } from './module'` : ''}
`

await fsp.writeFile(dtsFile, dtsContents, 'utf8')
Expand Down

0 comments on commit c308cc5

Please sign in to comment.