Closed michenly closed 2 years ago
The problem I am running into for getting webpack 4 -> webpack 5
compilation.chunkGroups
only shows main
so this is consistent)AsyncDependenciesBlock
was originally created with dep.require
for request
param. Changed it to use dep.request
but it also has undefined attached to the end. Temp just hack it out.compilation.chunkGraph.getChunkModulesIterable(chunk)
will list our 5 modules without module.resource
or module.id
. However, 5 is exactly the number of additional assets the webpack 4 version create...so...there is something there...addChunkInGroup
, b/t compilation.hooks.beforeChunks
&& compilation.hooks.afterChunks
hookscomplication.hooks.buildModule
, module.blocks.length = 8
, in compilation.hooks.succeedModule
, module.blocks.length = 0
, something happened in b/tFound the issue. compliation.hooks.buildModule
cannot be use to modify dependencies & blocks in webpack 5. Need to use hooks.parser
instead https://github.com/webpack/webpack/issues/13361
This plug in is now working in webpack 5 with 1 small hack
request
has undefined
at the end: I have a hack for it so far, but need to solve it at the root levelProper PR had been open https://github.com/facebook/react/pull/22739 and I will open a new PR to update the demo to use the new plugin when it is ready.
get the same plugin from react-server-dom-webpack to be compatible with webpack 5
npm run bundler:dev
plugins/react-server-dom-webpack-plugin.ts
plugins/react-server-dom-webpack-plugin.js