We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d23061b commit 91e6b8fCopy full SHA for 91e6b8f
config/plugin/react-ssr-dynamic-chunk-webpack-plugin/index.js
@@ -13,13 +13,13 @@ class ReactSSRDynamicChunkPlugin {
13
const buildPath = compilation.options.output.path;
14
15
16
- compilation.chunks.forEach(chunk => {
+ [...compilation.chunks].forEach(chunk => {
17
if (!this.opts.chunk) {
18
return;
19
}
20
21
- const chunks = chunk.files || [];
22
- const asyncChunks = chunk.getAllAsyncChunks();
+ const chunks = [ ...chunk.files];
+ const asyncChunks = [ ...chunk.getAllAsyncChunks()];
23
const mainChunkFile = chunks.length > 0 ? chunks[0] : null;
24
const mainChunkDir = mainChunkFile ? path.dirname(mainChunkFile) : null;
25
asyncChunks && asyncChunks.forEach(asyncChunk => {
0 commit comments