File tree 1 file changed +4
-2
lines changed
packages/next/build/webpack/plugins
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import { webpack , sources } from 'next/dist/compiled/webpack/webpack'
9
9
import { FLIGHT_MANIFEST } from '../../../shared/lib/constants'
10
- import { relative } from 'path'
10
+ import { relative , sep } from 'path'
11
11
import { isClientComponentModule , regexCSS } from '../loaders/utils'
12
12
13
13
import {
@@ -349,7 +349,9 @@ export class FlightManifestPlugin {
349
349
entryName : string | undefined | null
350
350
) => {
351
351
if ( entryName ?. startsWith ( 'app/' ) ) {
352
- const key = this . appDir + entryName . slice ( 3 )
352
+ // The `key` here should be the absolute file path but without extension.
353
+ // We need to replace the separator in the entry name to match the system separator.
354
+ const key = this . appDir + entryName . slice ( 3 ) . replace ( / \/ / g, sep )
353
355
entryCSSFiles [ key ] = files . concat ( entryCSSFiles [ key ] || [ ] )
354
356
}
355
357
}
You can’t perform that action at this time.
0 commit comments