diff --git a/packages/schema/src/types/config.ts b/packages/schema/src/types/config.ts index 7306c5222e..44a1390734 100644 --- a/packages/schema/src/types/config.ts +++ b/packages/schema/src/types/config.ts @@ -141,7 +141,7 @@ export interface AppConfigInput extends CustomAppConfig { server?: never } -type Serializable = T extends Function ? never : T extends Promise ? Serializable : T extends Record ? { [K in keyof T]: Serializable } : T +type Serializable = T extends Function ? never : T extends Promise ? Serializable : T extends string & {} ? T : T extends Record ? { [K in keyof T]: Serializable } : T export interface NuxtAppConfig { head: Serializable diff --git a/test/fixtures/basic-types/nuxt.config.ts b/test/fixtures/basic-types/nuxt.config.ts index 3278402fa3..93a409cc04 100644 --- a/test/fixtures/basic-types/nuxt.config.ts +++ b/test/fixtures/basic-types/nuxt.config.ts @@ -21,6 +21,13 @@ export default defineNuxtConfig({ title: Promise.resolve('Nuxt Fixture'), // @ts-expect-error Functions are not allowed titleTemplate: title => 'test', + meta: [ + { + // Allows unknown property + property: 'og:thing', + content: '1234567890', + }, + ], }, pageTransition: { // @ts-expect-error Functions are not allowed