chore: enable turbopack by default in monorepo (#12684)

No issues with turbopack reported so far, let's enable it by default in
our monorepo. The `--turbo` flag for our package.json `dev` and
`test:e2e` scripts has been replaced with an opt-out `--no-turbo` flag
This commit is contained in:
Alessio Gravili
2025-06-05 18:01:55 -07:00
committed by GitHub
parent aef4f779b1
commit f80dc5b99e
4 changed files with 15 additions and 10 deletions

View File

@@ -55,9 +55,12 @@ if (!testSuiteArg || !fs.existsSync(path.resolve(dirname, testSuiteArg))) {
process.exit(0)
}
console.log(`Selected test suite: ${testSuiteArg}`)
// Enable turbopack by default, unless --no-turbo is passed
const enableTurbo = args.turbo !== false
if (args.turbo === true) {
console.log(`Selected test suite: ${testSuiteArg}${enableTurbo ? ' [Turbopack]' : ' [Webpack]'}`)
if (enableTurbo) {
process.env.TURBOPACK = '1'
}
@@ -111,6 +114,8 @@ const app = nextImport({
hostname: 'localhost',
port: availablePort,
dir: rootDir,
turbo: enableTurbo,
turbopack: enableTurbo,
})
const handle = app.getRequestHandler()