Not a bug but, looking for some clarification
Code Splitting, CommonsChunkPlugin, bundle-buddy
The user guide has a section on code splitting that focuses on dynamic import. However, I don't see any info on preventing duplication.
The webpack code splitting guide and bundle-buddy recommend using CommonsChunkPlugin to prevent code duplication across multiple chunks. However, it seems that CRA is not using CommonsChunkPlugin. Is the duplication being prevented via some other mechanism? If not, would you be open to a PR that adds CommonsChunkPlugin to webpack.config.prod.js.
Thanks!
Related: https://github.com/facebookincubator/create-react-app/pull/3145 https://github.com/facebookincubator/create-react-app/pull/2310
I honestly don't know what's the right way to do it these days. We might need someone from webpack to help us with determining the right approach.
Hehe.
I had no idea about this but it's probably what we want: https://github.com/webpack/webpack/pull/6281
This is superseded by https://github.com/facebookincubator/create-react-app/issues/3878.
Most helpful comment
Hehe.
I had no idea about this but it's probably what we want: https://github.com/webpack/webpack/pull/6281