Skip to content

Commit

Permalink
chore(edge): addresses leftover from vercel#44045
Browse files Browse the repository at this point in the history
  • Loading branch information
feugy committed Dec 22, 2022
1 parent 0572e21 commit 2840c49
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions packages/next/build/analysis/get-page-static-info.ts
Expand Up @@ -313,17 +313,13 @@ export async function getPageStaticInfo(params: {
!isEdgeRuntime(resolvedRuntime)
) {
const options = Object.values(SERVER_RUNTIME).join(', ')
if (typeof resolvedRuntime !== 'string') {
Log.error(
`The \`runtime\` config must be a string. Please leave it empty or choose one of: ${options}`
)
} else {
Log.error(
`Provided runtime "${resolvedRuntime}" is not supported. Please leave it empty or choose one of: ${options}`
)
}
const message =
typeof resolvedRuntime !== 'string'
? `The \`runtime\` config must be a string. Please leave it empty or choose one of: ${options}`
: `Provided runtime "${resolvedRuntime}" is not supported. Please leave it empty or choose one of: ${options}`
Log.error(message)
if (!isDev) {
process.exit(1)
throw new Error(message)
}
}

Expand All @@ -347,9 +343,8 @@ export async function getPageStaticInfo(params: {
) {
const message = `Page ${page} provided runtime 'edge', the edge runtime for rendering is currently experimental. Use runtime 'experimental-edge' instead.`
Log.error(message)

if (!isDev) {
process.exit(1)
throw new Error(message)
}
}

Expand Down

0 comments on commit 2840c49

Please sign in to comment.