Whenever I do build
/ build --prod
I'm getting duplicate chunks with "es5" and "es2015".
Can any one help me here to understand this?
This is called differential loading from Angular 8.
es5 bundles are for old browsers like IE.
es6 bundles are for new browsers like Chrome etc.
You can see es5 bundle size is bit heavy than es6 because es5 bundle used by IE require additional polyfills which actually wont be required for new browsers.
The specific bundle will hit based on the browser. (So, no need to worry about bundle size)
Earlier, only single bundle used to get generated which is used by all the browsers.
Big shout out to Angular Team for bringing up this.