Skip to content

Commit 0c0020f

Browse files
committed
fix: support more than one line of type exports
1 parent 6291cbe commit 0c0020f

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
@@ -271,7 +271,7 @@ ${appShims.length ? `declare module '#app' {\n${appShims.join('\n')}\n}\n` : ''}
271271
${schemaShims.length ? `declare module '@nuxt/schema' {\n${schemaShims.join('\n')}\n}\n` : ''}
272272
${moduleExports.length ? `\n${moduleExports.join('\n')}` : ''}
273273
${isStub ? 'export * from "./module.mjs"' : ''}
274-
${moduleReExports[0] ? `\nexport { ${moduleReExports[0].names.map(n => (n === 'default' ? '' : 'type ') + n).join(', ')} } from './module.mjs'` : ''}
274+
${moduleReExports.map(e => `\nexport { ${e.names.map(n => (n === 'default' ? '' : 'type ') + n).join(', ')} } from './module.mjs'`)}
275275
`.trim().replace(/[\n\r]{3,}/g, '\n\n') + '\n'
276276

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

0 commit comments

Comments
 (0)