最初在浏览器中为Angular 2+ App加载的各种js文件是什么

时间:2018-11-22 12:18:55

标签: angular

enter image description here

这些是在浏览器中为我的angular应用程序加载的文件,我想知道每个js文件代表什么,我知道scripts.js文件包含我们添加到angular.json文件中的所有脚本。同样,其他js文件是什么?

1 个答案:

答案 0 :(得分:1)

main.js = your bundled application 

vendor.js = Any third-party library or "vendor" code your source is dependent on.

styles.js = contains a script to load all the style rules contained in your styles.scss

polyfills.js = dependencies bundled (@angular, RxJS) 

runtime.js = all the code webpack needs to connect your modularized application while it's running in the browser. 
It contains the loading and resolving logic needed to connect your modules as they interact. 
This includes connecting modules that have already been loaded into the browser as well as logic to lazy-load the ones that haven't.