Skip to content

Commit 015fb45

Browse files
feat: add support for type exports in module re-exports (#563)
1 parent 8a27c58 commit 015fb45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commands/build.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { createJiti } from 'jiti'
1010
import { anyOf, createRegExp } from 'magic-regexp'
1111
import { consola } from 'consola'
1212
import type { NuxtModule } from '@nuxt/schema'
13-
import { findExports, resolvePath } from 'mlly'
13+
import { findExports, resolvePath, findTypeExports } from 'mlly'
1414
import type { ESMExport } from 'mlly'
1515
import { defineCommand } from 'citty'
1616
import { convertCompilerOptionsFromJson } from 'typescript'
@@ -224,6 +224,9 @@ async function writeTypes(distDir: string, isStub: boolean) {
224224
for (const e of findExports(normalisedModuleTypes)) {
225225
moduleReExports.push(e)
226226
}
227+
for (const i of findTypeExports(normalisedModuleTypes)) {
228+
moduleReExports.push(i)
229+
}
227230
}
228231

229232
const appShims: string[] = []

0 commit comments

Comments
 (0)