Skip to content

Commit 04234cc

Browse files
authored
Update to use hasNextSupport for custom-routes in next export check (#17630)
Follow-up to #17538 per #17538 (comment) this updates the check to use the existing `hasNextSupport` export instead of checking the environment variable directly
1 parent 742f5d9 commit 04234cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/next/export/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import loadConfig, {
3333
isTargetLikeServerless,
3434
} from '../next-server/server/config'
3535
import { eventCliSession } from '../telemetry/events'
36+
import { hasNextSupport } from '../telemetry/ci-info'
3637
import { Telemetry } from '../telemetry/storage'
3738
import {
3839
normalizePagePath,
@@ -170,7 +171,7 @@ export default async function exportApp(
170171
)
171172

172173
if (
173-
!process.env.NOW_BUILDER &&
174+
!hasNextSupport &&
174175
!options.buildExport &&
175176
customRoutesDetected.length > 0
176177
) {

0 commit comments

Comments
 (0)