Skip to content

Commit 13ce8c4

Browse files
committed
fix: resolve file name
1 parent 326c42b commit 13ce8c4

File tree

1 file changed

+2
-2
lines changed
  • packages/language-core/lib/utils

1 file changed

+2
-2
lines changed

packages/language-core/lib/utils/ts.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type * as ts from 'typescript';
33
import { posix as path } from 'path-browserify';
44
import type { RawVueCompilerOptions, VueCompilerOptions, VueLanguagePlugin } from '../types';
55
import { getAllExtensions } from '../languagePlugin';
6-
import { generateGlobalTypes } from '../codegen/globalTypes';
6+
import { generateGlobalTypes, resolveGlobalTypesName } from '../codegen/globalTypes';
77

88
export type ParsedCommandLine = ts.ParsedCommandLine & {
99
vueOptions: VueCompilerOptions;
@@ -297,7 +297,7 @@ export function setupGlobalTypes(rootDir: string, vueOptions: VueCompilerOptions
297297
}
298298
dir = parentDir;
299299
}
300-
const globalTypesPath = path.join(dir, 'node_modules', '.vue-global-types', `${vueOptions.lib}_${vueOptions.target}_${vueOptions.strictTemplates}.d.ts`);
300+
const globalTypesPath = path.join(dir, 'node_modules', '.vue-global-types', resolveGlobalTypesName(vueOptions));
301301
const globalTypesContents = `// @ts-nocheck\nexport {};\n` + generateGlobalTypes(vueOptions);
302302
host.writeFile(globalTypesPath, globalTypesContents);
303303
return true;

0 commit comments

Comments
 (0)