I have not found a good way to split the pieces based on the result of the package itself. You can set a minimum size for output blocks so that they are concatenated when there are not many bytes in your block.
// This plugin prevents Webpack from creating chunks // that would be too small to be worth loading separately new webpack.optimize.MinChunkSizePlugin({ minChunkSize: 51200, // ~50kb }),
But I know that is not what you are looking for. Unfortunately, no one seems to have written anything like this. Sounds like an interesting recording plugin !
Also, check out this blog post that looks at some basics of splitting. http://blog.madewithlove.be/post/webpack-your-bags/
source share