Skip to content

Commit

Permalink
Fix flight manifest to include all chunks (#40365)
Browse files Browse the repository at this point in the history
When a client module is imported by both a module from an `app` entry and a module from `pages` entry, it is possible that it is included in the `pages` chunk eventually. The current check makes the manifest incomplete in that case.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
  • Loading branch information
shuding committed Sep 8, 2022
1 parent c8d3fa6 commit a24872b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/next/build/webpack/plugins/flight-manifest-plugin.ts
Expand Up @@ -121,12 +121,6 @@ export class FlightManifestPlugin {
id: ModuleId,
mod: webpack.NormalModule
) {
// if appDir is enabled we shouldn't process chunks from
// the pages dir
if (chunk.name?.startsWith('pages/') && appDir) {
return
}

const isCSSModule =
mod.type === 'css/mini-extract' ||
(mod.loaders &&
Expand Down

0 comments on commit a24872b

Please sign in to comment.