File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
language-core/lib/codegen/script Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export interface ScriptCodegenOptions {
5151export function * generateScript ( options : ScriptCodegenOptions ) : Generator < Code , ScriptCodegenContext > {
5252 const ctx = createScriptCodegenContext ( options ) ;
5353
54- yield `/// <reference types="${ options . vueCompilerOptions . lib } /__globalTypes_${ options . vueCompilerOptions . target } _${ options . vueCompilerOptions . strictTemplates } " />${ newLine } ` ;
54+ yield `/// <reference types="${ options . vueCompilerOptions . lib } /dist/ __globalTypes_${ options . vueCompilerOptions . target } _${ options . vueCompilerOptions . strictTemplates } .d.ts " />${ newLine } ` ;
5555
5656 if ( options . sfc . script ?. src ) {
5757 yield * generateSrc ( options . sfc . script , options . sfc . script . src ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export function run(tscPath = require.resolve('typescript/lib/tsc')) {
2727 : options . host ?. getCurrentDirectory ( ) ?? ts . sys . getCurrentDirectory ( ) ;
2828 const libDir = require . resolve ( `${ vueOptions . lib } /package.json` , { paths : [ rootDir ] } )
2929 . slice ( 0 , - 'package.json' . length ) ;
30- const globalTypesPath = `${ libDir } __globalTypes_${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
30+ const globalTypesPath = `${ libDir } dist/ __globalTypes_${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
3131 const globalTypesContents = vue . generateGlobalTypes ( vueOptions . lib , vueOptions . target , vueOptions . strictTemplates ) ;
3232 ts . sys . writeFile ( globalTypesPath , globalTypesContents ) ;
3333 } catch { }
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ describe('vue-tsc-dts', () => {
3737 : options . host ?. getCurrentDirectory ( ) ?? ts . sys . getCurrentDirectory ( ) ;
3838 const libDir = require . resolve ( `${ vueOptions . lib } /package.json` , { paths : [ rootDir ] } )
3939 . slice ( 0 , - 'package.json' . length ) ;
40- const globalTypesPath = `${ libDir } __globalTypes_${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
40+ const globalTypesPath = `${ libDir } dist/ __globalTypes_${ vueOptions . target } _${ vueOptions . strictTemplates } .d.ts` ;
4141 const globalTypesContents = vue . generateGlobalTypes ( vueOptions . lib , vueOptions . target , vueOptions . strictTemplates ) ;
4242 ts . sys . writeFile ( globalTypesPath , globalTypesContents ) ;
4343 } catch { }
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ const plugin: ts.server.PluginModuleFactory = mods => {
6363 try {
6464 const libDir = require . resolve ( `${ options . lib } /package.json` , { paths : [ proj . getCurrentDirectory ( ) ] } )
6565 . slice ( 0 , - 'package.json' . length ) ;
66- const globalTypesPath = `${ libDir } __globalTypes_${ options . target } _${ options . strictTemplates } .d.ts` ;
66+ const globalTypesPath = `${ libDir } dist/ __globalTypes_${ options . target } _${ options . strictTemplates } .d.ts` ;
6767 const globalTypesContents = vue . generateGlobalTypes ( options . lib , options . target , options . strictTemplates ) ;
6868 proj . writeFile ( globalTypesPath , globalTypesContents ) ;
6969 } catch { }
You can’t perform that action at this time.
0 commit comments