chore(nuxt): ensure type template has const filename

This commit is contained in:
Daniel Roe 2024-03-16 17:21:27 -07:00
parent 02d6838293
commit 1cae15a3a4
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -98,8 +98,8 @@ export const componentsIslandsTemplate: NuxtTemplate = {
}
}
export const componentsTypeTemplate: NuxtTemplate = {
filename: 'components.d.ts',
export const componentsTypeTemplate = {
filename: 'components.d.ts' as const,
getContents: ({ app, nuxt }) => {
const buildDir = nuxt.options.buildDir
const componentTypes = app.components.filter(c => !c.island).map(c => [
@ -123,7 +123,7 @@ ${componentTypes.map(([pascalName, type]) => `export const Lazy${pascalName}: ${
export const componentNames: string[]
`
}
}
} satisfies NuxtTemplate
export const componentsMetadataTemplate: NuxtTemplate = {
filename: 'components.json',