Skip to content

Commit

Permalink
fix(module): define #build/app.config
Browse files Browse the repository at this point in the history
Resolves #2532
  • Loading branch information
benjamincanac committed Nov 6, 2024
1 parent 64ad4b6 commit 12ae20d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/templates.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fileURLToPath } from 'node:url'
import { kebabCase } from 'scule'
import { addTemplate, addTypeTemplate } from '@nuxt/kit'
import { addTemplate, addTypeTemplate, createResolver } from '@nuxt/kit'
import type { Nuxt, NuxtTemplate, NuxtTypeTemplate } from '@nuxt/schema'
import type { ModuleOptions } from './module'
import * as theme from './theme'
Expand Down Expand Up @@ -98,4 +98,10 @@ export function addTemplates(options: ModuleOptions, nuxt: Nuxt) {
addTemplate(template)
}
}

const { resolve } = createResolver(import.meta.url)

nuxt.hook('prepare:types', ({ references }) => {
references.push({ path: resolve('./runtime/types/app.config.d.ts') })
})
}

0 comments on commit 12ae20d

Please sign in to comment.