Skip to content

Commit 7fe139b

Browse files
committed
Remove check for TURBOPACK=1
1 parent db60254 commit 7fe139b

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

Diff for: packages/next/src/cli/next-start.ts

-10
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ const nextStart = async (options: NextStartOptions, directory?: string) => {
3333
printAndExit(getReservedPortExplanation(port), 1)
3434
}
3535

36-
const isTurbopack = Boolean(
37-
options.turbo ||
38-
options.turbopack ||
39-
// TODO: Used for Testing in Next.js CI. Rename to something better like `NEXT_TEST_TURBOPACK`.
40-
process.env.TURBOPACK
41-
)
42-
if (isTurbopack) {
43-
process.env.TURBOPACK = '1'
44-
}
45-
4636
await startServer({
4737
dir,
4838
isDev: false,

Diff for: packages/next/src/server/next-server.ts

-14
Original file line numberDiff line numberDiff line change
@@ -192,20 +192,6 @@ export default class NextNodeServer extends BaseServer<
192192
this.isDev = isDev
193193
this.sriEnabled = Boolean(options.conf.experimental?.sri?.algorithm)
194194

195-
// @ts-expect-error internal field not publicly exposed
196-
const isTurbopackBuild = this.nextConfig.experimental?.isTurbopackBuild
197-
if (!isDev && typeof isTurbopackBuild !== 'undefined') {
198-
if (process.env.TURBOPACK && !isTurbopackBuild) {
199-
throw new Error(
200-
`Invariant: --turbopack is set but the build used Webpack`
201-
)
202-
} else if (!process.env.TURBOPACK && isTurbopackBuild) {
203-
throw new Error(
204-
`Invariant: --turbopack is not set but the build used Turbopack. Add --turbopack to "next start".`
205-
)
206-
}
207-
}
208-
209195
/**
210196
* This sets environment variable to be used at the time of SSR by head.tsx.
211197
* Using this from process.env allows targeting SSR by calling

0 commit comments

Comments
 (0)