Skip to content

Commit c308cc5

Browse files
committed
fix: ignore exporting type if it is not defined
1 parent f9f7dfd commit c308cc5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/commands/build.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ import type { ${moduleImports.join(', ')} } from './module'
178178
${appShims.length ? `declare module '#app' {\n${appShims.join('\n')}\n}\n` : ''}
179179
${schemaShims.length ? `declare module '@nuxt/schema' {\n${schemaShims.join('\n')}\n}\n` : ''}
180180
${schemaShims.length ? `declare module 'nuxt/schema' {\n${schemaShims.join('\n')}\n}\n` : ''}
181-
182-
export type { ${typeExports[0].names.join(', ')} } from './module'
181+
${typeExports[0] ? `\nexport type { ${typeExports[0].names.join(', ')} } from './module'` : ''}
183182
`
184183

185184
await fsp.writeFile(dtsFile, dtsContents, 'utf8')

0 commit comments

Comments
 (0)