Skip to content

Commit

Permalink
Skip internal app client entry for route handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Oct 14, 2024
1 parent c216728 commit 31271f8
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { getProxiedPluginState } from '../../build-context'
import { PAGE_TYPES } from '../../../lib/page-types'
import { getModuleBuildInfo } from '../loaders/get-module-build-info'
import { getAssumedSourceType } from '../loaders/next-flight-loader'
import { isAppRouteRoute } from '../../../lib/is-app-route-route'

interface Options {
dev: boolean
Expand Down Expand Up @@ -394,16 +395,18 @@ export class FlightClientEntryPlugin {
addClientEntryAndSSRModulesList.push(injected)
}

// Create internal app
addClientEntryAndSSRModulesList.push(
this.injectClientEntryAndSSRModules({
compiler,
compilation,
entryName: name,
clientImports: { ...internalClientComponentEntryImports },
bundlePath: APP_CLIENT_INTERNALS,
})
)
if (!isAppRouteRoute(name)) {
// Create internal app
addClientEntryAndSSRModulesList.push(
this.injectClientEntryAndSSRModules({
compiler,
compilation,
entryName: name,
clientImports: { ...internalClientComponentEntryImports },
bundlePath: APP_CLIENT_INTERNALS,
})
)
}

if (actionEntryImports.size > 0) {
if (!actionMapsPerEntry[name]) {
Expand Down

0 comments on commit 31271f8

Please sign in to comment.