Test edge runtime

This commit is contained in:
Henrik Larsson 2023-08-15 09:37:38 +02:00
parent eecb440146
commit d971821871
2 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,8 @@ import type { Metadata } from 'next';
import { draftMode } from 'next/headers'; import { draftMode } from 'next/headers';
import { notFound } from 'next/navigation'; import { notFound } from 'next/navigation';
export const runtime = draftMode().isEnabled ? 'node' : 'edge';
export async function generateMetadata({ export async function generateMetadata({
params params
}: { }: {

View File

@ -7,6 +7,8 @@ import { Metadata } from 'next';
import { draftMode } from 'next/headers'; import { draftMode } from 'next/headers';
import { notFound } from 'next/navigation'; import { notFound } from 'next/navigation';
export const runtime = draftMode().isEnabled ? 'node' : 'edge';
export async function generateMetadata({ export async function generateMetadata({
params params
}: { }: {