Open InvincibleJun opened 6 years ago
I don't think this issue tracker is meant to be used as a support option. But itsn't it because of minChunks: 3 in CommonsChunkPlugin. It essentially will only placed it in a seperate chunk if 3 chunks uses it. If only 2 it will not do that. If you setr minChunks to 2 that would probably do it for you. But that could have other consequences.
I don't think this issue tracker is meant to be used as a support option. But itsn't it because of minChunks: 3 in CommonsChunkPlugin. It essentially will only placed it in a seperate chunk if 3 chunks uses it. If only 2 it will not do that. If you setr minChunks to 2 that would probably do it for you. But that could have other consequences.
the vendor file size did not changed, but it hash value changed.
Version
2.9.3
Reproduction link
https://github.com/InvincibleJun/demo
Node and OS info
Node 8.9.1 / npm 5.5.1 / Windows 10
Steps to reproduce
for example, I have four pages which use `() => import and use echarts. when all pages use echarts and I packed, it will make a extra chunk file. Then I only use echarts in two pages and I packed, the vendor.[hash].js is different as old file. it ‘s so terrible.
CommonsChunkPlugin options as follows or see the demo
What is expected?
the vendor hash not changed
What is actually happening?
the hash changed