Skip to content

Commit

Permalink
fix: fails to generate declarationMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
2wheeh committed Aug 7, 2023
1 parent 1b75bc2 commit 63321c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ export function dtsPlugin(options: PluginOptions = {}): import('vite').Plugin {
const sourceFile = program.getSourceFile(id)

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

0 comments on commit 63321c2

Please sign in to comment.