Skip to content

Commit

Permalink
fix module id
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed May 10, 2022
1 parent 8c6720f commit e2ec2aa
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,14 @@ export class FlightManifestPlugin {
for (const mod of chunkModules) {
let modId = compilation.chunkGraph.getModuleId(mod)

// remove resource query on production
// Clean up the module id.
if (typeof modId === 'string') {
// Remove resource queries.
modId = modId.split('?')[0]
// Remove the loader prefix.
modId = modId.split('next-flight-client-loader.js!')[1]
}

recordModule(modId, chunk, mod)
// If this is a concatenation, register each child to the parent ID.
if (mod.modules) {
Expand Down

0 comments on commit e2ec2aa

Please sign in to comment.