Skip to content

Commit 1720d99

Browse files
committed
Include all .js files in the client manifest
This is not going to fly for any serious implementation. It pretty much has to do a pre-compile pass over the server graph to discover the files to include. This is enough to run our fixture though.
1 parent 0d207a6 commit 1720d99

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

fixtures/flight/config/webpack.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,14 @@ module.exports = function (webpackEnv) {
752752
// },
753753
// }),
754754
// Fork Start
755-
new ReactFlightWebpackPlugin({isServer: false}),
755+
new ReactFlightWebpackPlugin({
756+
isServer: false,
757+
clientReferences: {
758+
directory: './src',
759+
recursive: true,
760+
include: /\.(js|ts|jsx|tsx)$/,
761+
},
762+
}),
756763
// Fork End
757764
].filter(Boolean),
758765
// Turn off performance processing because we utilize

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class ReactFlightWebpackPlugin {
7979
{
8080
directory: '.',
8181
recursive: true,
82-
include: /\.client\.(js|ts|jsx|tsx)$/,
82+
include: /\.(js|ts|jsx|tsx)$/,
8383
},
8484
];
8585
} else if (
@@ -231,7 +231,7 @@ export default class ReactFlightWebpackPlugin {
231231
// That way we know by the type of dep whether to include.
232232
// It also resolves conflicts when the same module is in multiple chunks.
233233

234-
if (!/\.client\.(js|ts)x?$/.test(module.resource)) {
234+
if (!/\.(js|ts)x?$/.test(module.resource)) {
235235
return;
236236
}
237237

0 commit comments

Comments
 (0)