MCPcopy
hub / github.com/vercel/next.js / shouldUseTurbopack

Function shouldUseTurbopack

test/lib/turbo.ts:3–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1let loggedTurbopack = false
2
3export function shouldUseTurbopack(): boolean {
4 if (!!process.env.NEXT_TEST_WASM || !!process.env.NEXT_TEST_WASM_AFTER_JEST) {
5 return false
6 }
7
8 const enabled = !!process.env.IS_TURBOPACK_TEST
9 if (enabled && !loggedTurbopack) {
10 require('console').log(
11 `Running tests with turbopack because environment variable IS_TURBOPACK_TEST is set`
12 )
13 loggedTurbopack = true
14 }
15
16 return enabled
17}

Callers 9

launchAppFunction · 0.90
nextBuildFunction · 0.90
nextStartFunction · 0.90
getSnapshotTestDescribeFunction · 0.90
index.tsFile · 0.85
createNextFunction · 0.85
isTurbopackFunction · 0.85
constructorMethod · 0.85

Calls 2

requireFunction · 0.50
logMethod · 0.45

Tested by

no test coverage detected