webpack & HTTP/2
Tobias Koppers
38010

nice work!

I has a question about AggressiveSplittingPlugin , which I had google many days but got nothing.

An application using this technique no longer emits a single file which can be included in the HTML file. It emits multiple chunks which all need to be loaded.

I think I understand the methodology. I succeed in adding AggressiveSplittingPlugin into my webpack config and split a big chunk to small ones.

Here comes the question: after webpack compilation, how to insert the splitted chunks correctly into HTML file?

For Example:

I use CommonChunkPlugin to get ventors.js , then insert into HTML file:

<script src="./ventors.js"></script>

it works.

After use AggressiveSplittingPlugin , ventors.js is splitted to a.js , b.js , c.js , and so on. I don’t know which chunks in dist fold is splitted from ventors.js , so I can’t insert correct chunks into HTML file.

Should I use html-webpack-plugin to generate HTML file or use other plugins to make it work?

Is there some kind of manifest tell the origin chunk and it’s relative splitted chunks. webpack-manifest-plugin seems don‘t map origin chunk to splitted chunks.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.