Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed Nov 29, 2022
1 parent 1f72ffc commit d0b120c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/next/build/entries.ts
Expand Up @@ -517,9 +517,9 @@ export function finalizeEntrypoint({
}
}

const isAppEntry =
const isAppLayer =
hasAppDir &&
([CLIENT_STATIC_FILES_RUNTIME_MAIN_APP].includes(name) ||
(name === CLIENT_STATIC_FILES_RUNTIME_MAIN_APP ||
entry.import.includes('next-flight-client-entry-loader'))

if (
Expand All @@ -533,10 +533,10 @@ export function finalizeEntrypoint({
].includes(name)
) {
// TODO-APP: this is a temporary fix. @shuding is going to change the handling of server components
if (hasAppDir && entry.import.includes('next-flight-client-entry-loader')) {
if (isAppLayer) {
return {
dependOn: CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,
layer: isAppEntry ? WEBPACK_LAYERS.appClient : undefined,
layer: WEBPACK_LAYERS.appClient,
...entry,
}
}
Expand All @@ -550,7 +550,7 @@ export function finalizeEntrypoint({
}
}

if (isAppEntry) {
if (isAppLayer) {
return {
layer: WEBPACK_LAYERS.appClient,
...entry,
Expand Down

0 comments on commit d0b120c

Please sign in to comment.