Skip to content

Commit

Permalink
fix(build): only generate import type statement if required
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jun 19, 2024
1 parent d29337c commit 190bff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ async function writeTypes(distDir: string) {
const dtsContents = `
${schemaImports.length ? `import type { ${schemaImports.join(', ')} } from '@nuxt/schema'` : ''}
import type { ${moduleImports.join(', ')} } from './module'
${moduleImports.length ? `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` : ''}
Expand Down

0 comments on commit 190bff4

Please # to comment.