Skip to content

Commit 190bff4

Browse files
committed
fix(build): only generate import type statement if required
1 parent d29337c commit 190bff4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ async function writeTypes(distDir: string) {
237237
const dtsContents = `
238238
${schemaImports.length ? `import type { ${schemaImports.join(', ')} } from '@nuxt/schema'` : ''}
239239
240-
import type { ${moduleImports.join(', ')} } from './module'
240+
${moduleImports.length ? `import type { ${moduleImports.join(', ')} } from './module'` : ''}
241241
242242
${appShims.length ? `declare module '#app' {\n${appShims.join('\n')}\n}\n` : ''}
243243
${schemaShims.length ? `declare module '@nuxt/schema' {\n${schemaShims.join('\n')}\n}\n` : ''}

0 commit comments

Comments
 (0)