Unverified Commit 1669c606 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Fix next.config.js overwriting on deploy e2e test (#39476)

parent bd61406e
......@@ -178,10 +178,14 @@ export class NextInstance {
}
}
const nextConfigFile = Object.keys(this.files).find((file) =>
let nextConfigFile = Object.keys(this.files).find((file) =>
file.startsWith('next.config.')
)
if (await fs.pathExists(path.join(this.testDir, 'next.config.js'))) {
nextConfigFile = 'next.config.js'
}
if (nextConfigFile && this.nextConfig) {
throw new Error(
`nextConfig provided on "createNext()" and as a file "${nextConfigFile}", use one or the other to continue`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment