Live preview e2e tests had no CSS when tested against prod. For all our other tests, we have a separate test/app directory that imports CSS. Otherwise, the root-level /app directory is used. For live-preview, we currently always run against test/live-preview/app, that has no CSS import. This PR adds a new test/live-preview/prod/app directory that imports CSS and is used when we run tests against prod. In order for this to work, I had to make import map generation smarter
26 lines
735 B
TypeScript
26 lines
735 B
TypeScript
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
|
|
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
|
|
import type { Metadata } from 'next'
|
|
|
|
import config from '@payload-config'
|
|
import { generatePageMetadata, NotFoundPage } from '@payloadcms/next/views'
|
|
|
|
import { importMap } from '../importMap.js'
|
|
|
|
type Args = {
|
|
params: Promise<{
|
|
segments: string[]
|
|
}>
|
|
searchParams: Promise<{
|
|
[key: string]: string | string[]
|
|
}>
|
|
}
|
|
|
|
export const generateMetadata = ({ params, searchParams }: Args): Promise<Metadata> =>
|
|
generatePageMetadata({ config, params, searchParams })
|
|
|
|
const NotFound = ({ params, searchParams }: Args) =>
|
|
NotFoundPage({ config, importMap, params, searchParams })
|
|
|
|
export default NotFound
|