File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import type { TSConfig } from 'pkg-types'
22import { readTSConfig , writeTSConfig } from 'pkg-types'
3+ import { fs } from 'zx'
34import type { VueMacros } from '../common'
45import { vueMacros } from '../common'
56
67export async function rewriteTsConfig ( selectedMacros : VueMacros , target : string ) {
7- const tsconfig = await readTSConfig ( target ) as TSConfig & { vueCompilerOptions ?: any }
8- if ( ! tsconfig )
8+ const filename = ` ${ target } /nuxt.config.ts`
9+ if ( ! await fs . pathExists ( filename ) )
910 return
1011
12+ const tsconfig = await readTSConfig ( target ) as TSConfig & { vueCompilerOptions ?: any }
13+
1114 const macros = vueMacros . reduce ( ( result , macro ) => {
1215 if ( macro . volar ) {
1316 if ( [ 'stable' , 'official' ] . includes ( macro . status ) )
You can’t perform that action at this time.
0 commit comments