Skip to content

Commit

Permalink
Update to use hasNextSupport for custom-routes in next export check (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
ijjk committed Oct 5, 2020
1 parent 742f5d9 commit 04234cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/export/index.ts
Expand Up @@ -33,6 +33,7 @@ import loadConfig, {
isTargetLikeServerless,
} from '../next-server/server/config'
import { eventCliSession } from '../telemetry/events'
import { hasNextSupport } from '../telemetry/ci-info'
import { Telemetry } from '../telemetry/storage'
import {
normalizePagePath,
Expand Down Expand Up @@ -170,7 +171,7 @@ export default async function exportApp(
)

if (
!process.env.NOW_BUILDER &&
!hasNextSupport &&
!options.buildExport &&
customRoutesDetected.length > 0
) {
Expand Down

0 comments on commit 04234cc

Please sign in to comment.