fix: opt in to import.meta.* properties (#1561)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Daniel Roe
2024-03-25 16:57:58 +00:00
committed by GitHub
parent ae58d5c2b9
commit cc62e345eb
6 changed files with 7 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ export async function fetchComponentMeta (name: string) {
// Store promise to avoid multiple calls
// add to nitro prerender
if (process.server) {
if (import.meta.server) {
const event = useRequestEvent()
event.node.res.setHeader(
'x-nitro-prerender',

View File

@@ -11,7 +11,7 @@ export async function fetchContentExampleCode (name?: string) {
if (state.value[name]) { return state.value[name] }
// add to nitro prerender
if (process.server) {
if (import.meta.server) {
const event = useRequestEvent()
event.node.res.setHeader(
'x-nitro-prerender',