Skip to content

Commit

Permalink
fix layer detection
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 9, 2022
1 parent e9115c4 commit fac79be
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -85,13 +85,11 @@ export class FlightClientEntryPlugin {
const recordModule = (modId: string, mod: any) => {
const modResource = mod.resourceResolveData?.path || mod.resource

if (
mod.resourceResolveData?.context?.issuerLayer !==
WEBPACK_LAYERS.client
) {
if (mod.layer !== WEBPACK_LAYERS.client) {
return
}

// Check mod resource to exclude the empty resource module like virtual module created by next-flight-client-entry-loader
if (typeof modId !== 'undefined' && modResource) {
// Note that this isn't that reliable as webpack is still possible to assign
// additional queries to make sure there's no conflict even using the `named`
Expand Down

0 comments on commit fac79be

Please sign in to comment.