Skip to content

Commit

Permalink
fix: include .d.ts extension in multiple outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaJastrz committed Dec 22, 2022
1 parent f41b90a commit b2021e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin.ts
Expand Up @@ -438,7 +438,7 @@ export function dtsPlugin(options: PluginOptions = {}): import('vite').Plugin {
const typesPath = types ? resolve(root, types) : resolve(outputDir, indexName)

for (const name of entryNames) {
let filePath = multiple ? resolve(outputDir, name.replace(tsRE, '.d.ts')) : typesPath
let filePath = multiple ? resolve(outputDir, `${name}.d.ts`) : typesPath

if (fs.existsSync(filePath)) continue

Expand Down

0 comments on commit b2021e4

Please sign in to comment.