为什么在ng serve命令上创建runtime.js,styles.js [英] Why are runtime.js, styles.js created on ng serve command
问题描述
问候程序员们
我对angular并不陌生,我想知道为什么当我运行 ng serve 命令时会创建这两个文件.
I am new to angular and I wanted to know why are these two files created when I run ng serve command.
我知道为什么还要创建其他3个文件(main.js,polyfills.js,vendor.js),但是我不知道我提到的2个文件(runtime.js,styles.js)
I know why other 3 files are created (main.js, polyfills.js, vendor.js) but I don't know about the 2 files I mentioned (runtime.js, styles.js)
我也尝试使用谷歌搜索,但是这两个文件都没有信息.
I tried googling it too but no information came on these two files.
感谢您的帮助.
推荐答案
我的解释不好,但让我对这些事情有所了解.其基本的 webpack (AOT编译器)配置可连续监视您对代码的更改,如果更改检测到其可编译所有文件并转换为最小版本.
I am not good in explanation but let me give my understanding on these things. Its basically webpack (AOT compailer) configuration which continuously watch your changes on code, if change detect its compile all files and convert in minimized version.
- runtime.js :包含所有文件(组件,模块,服务,管道等),这些文件都转换为js并转换为最小化版本.
- styles.js :与CSS文件相同.
- runtime.js : Contains all files (Component, module, services, pipes, etc.) convert into js and transform into minimized version.
- styles.js : same for css files.
我希望你能从中得到启发.
i hope you get idea from this.
这篇关于为什么在ng serve命令上创建runtime.js,styles.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!