Skip to content

Commit

Permalink
move clear to client
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Sep 26, 2022
1 parent dd21428 commit 1470387
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -64,11 +64,6 @@ export class FlightClientEntryPlugin {
})

compiler.hooks.afterCompile.tap(PLUGIN_NAME, (compilation) => {
if (!this.isEdgeServer) {
// Reset only in server compiler for each round of compilation,
// then it's still preserved for edge compiler
ASYNC_CLIENT_MODULES.clear()
}
traverseModules(compilation, (mod) => {
// The module must has request, and resource so it's not a new entry created with loader.
// Using the client layer module, which doesn't have `rsc` tag in buildInfo.
Expand Down
2 changes: 2 additions & 0 deletions packages/next/build/webpack/plugins/flight-manifest-plugin.ts
Expand Up @@ -333,6 +333,8 @@ export class FlightManifestPlugin {
const file = 'server/' + FLIGHT_MANIFEST
const json = JSON.stringify(manifest)

ASYNC_CLIENT_MODULES.clear()

assets[file + '.js'] = new sources.RawSource(
'self.__RSC_MANIFEST=' + json
// Work around webpack 4 type of RawSource being used
Expand Down

0 comments on commit 1470387

Please sign in to comment.