File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/module/src/modules/config Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1- import { dirname } from 'node:path'
1+ import { dirname , join } from 'node:path'
22import fs from 'node:fs/promises'
33import type { Nuxt } from '@nuxt/schema'
44import type { ESLintConfigGenAddon } from '../../types'
@@ -17,8 +17,10 @@ export async function setupConfigGen(options: ModuleOptions, nuxt: Nuxt) {
1717 createAddonGlobals ( nuxt ) ,
1818 ]
1919
20- nuxt . hook ( 'prepare:types' , ( { declarations } ) => {
20+ nuxt . hook ( 'prepare:types' , ( { declarations, nodeReferences } ) => {
2121 declarations . push ( '/// <reference path="./eslint-typegen.d.ts" />' )
22+ if ( nodeReferences )
23+ nodeReferences . push ( { path : join ( nuxt . options . buildDir , 'eslint-typegen.d.ts' ) } )
2224 } )
2325
2426 let _configFile : string = undefined !
You can’t perform that action at this time.
0 commit comments