Skip to content

Commit 3995639

Browse files
committed
Add support for concatenated modules
1 parent 1b63456 commit 3995639

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/react-server-dom-webpack/src/ReactFlightWebpackPlugin.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default class ReactFlightWebpackPlugin {
183183
const moduleExports = {};
184184
['', '*'].concat(mod.buildMeta.providedExports).forEach(name => {
185185
moduleExports[name] = {
186-
id: mod.id,
186+
id: id,
187187
chunks: chunkIds,
188188
name: name,
189189
};
@@ -197,6 +197,12 @@ export default class ReactFlightWebpackPlugin {
197197
chunkGroup.chunks.forEach(chunk => {
198198
chunk.getModules().forEach(mod => {
199199
recordModule(mod.id, mod);
200+
// If this is a concatenation, register each child to the parent ID.
201+
if (mod.modules) {
202+
mod.modules.forEach(concatenatedMod => {
203+
recordModule(mod.id, concatenatedMod);
204+
});
205+
}
200206
});
201207
});
202208
});

0 commit comments

Comments
 (0)