From 04234cc312b7b780a52ba6f9f63490d5699da4a3 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Mon, 5 Oct 2020 10:26:11 -0500 Subject: [PATCH] Update to use hasNextSupport for custom-routes in next export check (#17630) Follow-up to https://github.com/vercel/next.js/pull/17538 per https://github.com/vercel/next.js/pull/17538#discussion_r499647323 this updates the check to use the existing `hasNextSupport` export instead of checking the environment variable directly --- packages/next/export/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/next/export/index.ts b/packages/next/export/index.ts index 7564979686245e8..9bd7d5bc9c8f3e8 100644 --- a/packages/next/export/index.ts +++ b/packages/next/export/index.ts @@ -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, @@ -170,7 +171,7 @@ export default async function exportApp( ) if ( - !process.env.NOW_BUILDER && + !hasNextSupport && !options.buildExport && customRoutesDetected.length > 0 ) {