Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

docs: add a bit more detail in the definePageMeta warning to specify it needs to be in a page #8923

Merged
merged 2 commits into from Nov 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/nuxt/src/pages/runtime/composables.ts
Expand Up @@ -38,14 +38,14 @@ export interface PageMeta {
}

declare module 'vue-router' {
interface RouteMeta extends UnwrapRef<PageMeta> {}
interface RouteMeta extends UnwrapRef<PageMeta> { }
}

const warnRuntimeUsage = (method: string) =>
console.warn(
`${method}() is a compiler-hint helper that is only usable inside ` +
'the script block of a single file component. Its arguments should be ' +
'compiled away and passing it at runtime has no effect.'
'the script block of a single file component which is also a page. Its arguments should be ' +
'compiled away and passing it at runtime has no effect.'
)

// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down