Skip to content

Commit

Permalink
fix: fails to generate hen types are already in out dir
Browse files Browse the repository at this point in the history
fix #254
  • Loading branch information
qmhc committed Jul 30, 2023
1 parent 584cc91 commit 284c77f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugin.ts
Expand Up @@ -375,7 +375,8 @@ export function dtsPlugin(options: PluginOptions = {}): import('vite').Plugin {
const sourceFile = program.getSourceFile(id)

if (sourceFile) {
for (const outputFile of service.getEmitOutput(sourceFile.fileName, true).outputFiles) {
for (const outputFile of service.getEmitOutput(sourceFile.fileName, true, true)
.outputFiles) {
outputFiles.set(
resolve(publicRoot, relative(outDir, ensureAbsolute(outputFile.name, outDir))),
outputFile.text
Expand Down

0 comments on commit 284c77f

Please sign in to comment.