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
16 lines
321 B
JavaScript
16 lines
321 B
JavaScript
import nextConfig from '../../../next.config.mjs'
|
|
|
|
import path from 'path'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const dirname = path.dirname(__filename)
|
|
|
|
export default {
|
|
...nextConfig,
|
|
env: {
|
|
PAYLOAD_CORE_DEV: 'true',
|
|
ROOT_DIR: path.resolve(dirname),
|
|
},
|
|
}
|