Skip to content

Commit

Permalink
Rename isFlightPage -> isServerComponentPage
Browse files Browse the repository at this point in the history
Co-Authored-By: JJ Kasper <22380829+ijjk@users.noreply.github.com>
  • Loading branch information
timneutkens and ijjk committed May 2, 2022
1 parent 79884cd commit b4af8fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions packages/next/build/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { __ApiPreviewProps } from '../server/api-utils'
import { isTargetLikeServerless } from '../server/utils'
import { warn } from './output/log'
import { parse } from '../build/swc'
import { isFlightPage, withoutRSCExtensions } from './utils'
import { isServerComponentPage, withoutRSCExtensions } from './utils'
import { normalizePathSep } from '../shared/lib/page-path/normalize-path-sep'
import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'

Expand Down Expand Up @@ -251,7 +251,10 @@ export function getEdgeServerEntry(opts: {
absolutePagePath: opts.absolutePagePath,
buildId: opts.buildId,
dev: opts.isDev,
isServerComponent: isFlightPage(opts.config, opts.absolutePagePath),
isServerComponent: isServerComponentPage(
opts.config,
opts.absolutePagePath
),
page: opts.page,
stringifiedConfig: JSON.stringify(opts.config),
}
Expand Down
4 changes: 2 additions & 2 deletions packages/next/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ import {
copyTracedFiles,
isReservedPage,
isCustomErrorPage,
isFlightPage,
isServerComponentPage,
} from './utils'
import getBaseWebpackConfig from './webpack-config'
import { PagesManifest } from './webpack/plugins/pages-manifest-plugin'
Expand Down Expand Up @@ -977,7 +977,7 @@ export default async function build(
: undefined

if (hasServerComponents && pagePath) {
if (isFlightPage(config, pagePath)) {
if (isServerComponentPage(config, pagePath)) {
isServerComponent = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ export function withoutRSCExtensions(pageExtensions: string[]): string[] {
)
}

export function isFlightPage(
export function isServerComponentPage(
nextConfig: NextConfigComplete,
filePath: string
): boolean {
Expand Down

0 comments on commit b4af8fd

Please sign in to comment.