Skip to content

Commit e145d0b

Browse files
agilgur5ezolenko
andauthored
fix: use .d.ts instead of .vue.d.ts for Vue declarations (ezolenko#336)
* - fix for vue declaration file names * fix: use .d.ts instead of .vue.d.ts for Vue declarations - `.vue.d.ts` was recommended by the `rollup-plugin-vue` maintainers back when this code was originally written, but apparently it causes problems with some imports - plain `.d.ts` seems to work fine according to users - and plain is the standard in TS too I believe Co-authored-by: ezolenko <[email protected]>
1 parent 8e58037 commit e145d0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const typescript: PluginImpl<RPT2Options> = (options) =>
328328

329329
let fileName = entry.name;
330330
if (fileName.includes("?")) // HACK for rollup-plugin-vue, it creates virtual modules in form 'file.vue?rollup-plugin-vue=script.ts'
331-
fileName = fileName.split("?", 1) + extension;
331+
fileName = fileName.split(".vue?", 1) + extension;
332332

333333
// If 'useTsconfigDeclarationDir' is given in the
334334
// plugin options, directly write to the path provided

0 commit comments

Comments
 (0)