Unverified Commit 92405d24 authored by Maia Teegarden's avatar Maia Teegarden Committed by GitHub

Search for lockfiles to find Turbopack root (#49110)

Search for package manager lockfiles to find Turbopack root since
`turbo.json` files can be nested now.

---------
parent e4beb85b
......@@ -265,21 +265,11 @@ const nextDev: CliCommand = async (argv) => {
)
}
const turboJson = findUp.sync('turbo.json', { cwd: dir })
// eslint-disable-next-line no-shadow
const packagePath = findUp.sync('package.json', { cwd: dir })
let bindings: any = await loadBindings()
let server = bindings.turbo.startDev({
...devServerOptions,
showAll: args['--show-all'] ?? false,
root:
args['--root'] ??
(turboJson
? path.dirname(turboJson)
: packagePath
? path.dirname(packagePath)
: undefined),
root: args['--root'] ?? rawNextConfig.experimental?.outputFileTracingRoot,
})
// Start preflight after server is listening and ignore errors:
preflight().catch(() => {})
......
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