What are the roles of various files produced in angular bundle (AoT compilation)
ng build --prod --aot in my current angular4 project and I got following files in my dist folders.
inline.6405cab307cfc3c6a636.bundle.js : 2 KB
main.a799c9fd4322567743dc.bundle.js : 35 KB
0.01d7070ba0efe736c78d.chunk.js: 129 KB
I would like to know:
- What kind of code goes in each of these files. I want to know this because I want to be able to control the size of each file.
- Which of these files are necessary for page load in the browser.
scripts.6072021e6a4e32c07d7e.bundle.js: I created a new ng4 project and compiled that. There was no such files in the dist. However this file is produced during compilation of my current project (and weights the heaviest). Can you answer why?
scripts.abc.bundle.js: generated from the
scriptsarray inside your
styles.abc.bundle.css: generated from the
stylesarray inside your
vendor.abc.bundle.js: generated from the
polyfills.abc.bundle.js: generated for older browser compatibility (like IE 9)
main.abc.bundle.js: your main components code
inline.abc.bundle.js: for webpack imports.
chunk.js: for chunk fragments like .png files.
2) All of them
3) Since in a new project the scripts array will be empty, there won't be any bundle to generate.