mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-19 15:10:58 +00:00
chore(nuxt): ensure type template has const filename
This commit is contained in:
parent
02d6838293
commit
1cae15a3a4
@ -98,8 +98,8 @@ export const componentsIslandsTemplate: NuxtTemplate = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const componentsTypeTemplate: NuxtTemplate = {
|
export const componentsTypeTemplate = {
|
||||||
filename: 'components.d.ts',
|
filename: 'components.d.ts' as const,
|
||||||
getContents: ({ app, nuxt }) => {
|
getContents: ({ app, nuxt }) => {
|
||||||
const buildDir = nuxt.options.buildDir
|
const buildDir = nuxt.options.buildDir
|
||||||
const componentTypes = app.components.filter(c => !c.island).map(c => [
|
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[]
|
export const componentNames: string[]
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
}
|
} satisfies NuxtTemplate
|
||||||
|
|
||||||
export const componentsMetadataTemplate: NuxtTemplate = {
|
export const componentsMetadataTemplate: NuxtTemplate = {
|
||||||
filename: 'components.json',
|
filename: 'components.json',
|
||||||
|
Loading…
Reference in New Issue
Block a user