[Angular 8] Calculate and Measure Performance budgets with the Angular CLI
Measuring is extremely important, without numbers we don’t know about potential problems and we don’t have a base we can improve upon. Performance Budgets are a way to impose limits on metrics that may affect our app’s performance. In this lesson we’ll learn how to configure the Angular CLI to configure performance budgets, to monitor them and to alert us when we violate them.
In angular.json:
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "bundle",
"name": "main",
"maximumWarning": "350kb",
"maximumError": "500kb"
}
]
}
}
},
[Angular 8] Calculate and Measure Performance budgets with the Angular CLI的更多相关文章
- Angular 1 深度解析:脏数据检查与 angular 性能优化
TL;DR 脏检查是一种模型到视图的数据映射机制,由 $apply 或 $digest 触发. 脏检查的范围是整个页面,不受区域或组件划分影响 使用尽量简单的绑定表达式提升脏检查执行速度 尽量减少页面 ...
- Angular入门到精通系列教程(14)- Angular 编译打包 & Docker发布
目录 1. 概要 2. 编译打包 2.1. 基本打包命令 2.2. 打包部署到二级目录 3. Angular站点的发布 3.1. web服务器发布 3.2. 使用docker发布 4. 总结 环境: ...
- angular源码分析:injector.js文件分析——angular中的依赖注入式如何实现的(续)
昨天晚上写完angular源码分析:angular中jqLite的实现--你可以丢掉jQuery了,给今天定了一个题angular源码分析:injector.js文件,以及angular的加载流程,但 ...
- 【Angular专题】——(2)【译】Angular中的ForwardRef
原文地址:https://blog.thoughtram.io/angular/2015/09/03/forward-references-in-angular-2.html 作者:Christoph ...
- [Angular] Fetch non-JSON data by specifying HttpClient responseType in Angular
By default the new Angular Http client (introduced in v4.3.1) uses JSON as the data format for commu ...
- [Angular] Create a custom validator for reactive forms in Angular
Also check: directive for form validation User input validation is a core part of creating proper HT ...
- angular 子路由跳转出现Navigation triggered outside Angular zone, did you forget to call ‘ngZone.run() 的问题修复
angular 路由功能非常强大,同时angular的路由也非常脆弱,非常容易出现错误. 那么在我们遇到异常时,首先要做的是什么? 第一步:检查代码,对比官方文档,发现代码中不一致的地方进行改正. 第 ...
- [Angular] Show a Loading Indicator for Lazy Routes in Angular
We can easily code split and lazy load a route in Angular. However when the user then clicks that la ...
- Angular05 angular架构、搭建angular开发环境、组件必备三要素、angular启动过程
1 angular架构 1.1 组件:是angular应用的基本构建模块,可以理解为一段带有业务逻辑和数据的HTML 1.2 服务:用来封装可重用的业务逻辑 1.3 指令:允许你想HTML元素添加自定 ...
随机推荐
- 【转帖】docker 如何删除none镜像
https://blog.csdn.net/hicoldcat/article/details/80802447 shell 命令博大精深 需要仔细学习 删除none的镜像,要先删除镜像中的容器.要删 ...
- 玫瑰花小制作分享-JavaScript(七夕专属浪漫)
分享一个玫瑰花的制作小方法,用小小的代码给自己的她送上一个不一样的玫瑰花. 玫瑰花代码由JavaScript实现,JavaScript 作为一种脚本语言, 被发明用于在 HTML 网页上使用,可以给H ...
- 00 Python的变量
变量分类 a.全局变量:在模块内.在所有函数外面.在class外面,这就是全局变量. b.局部变量:在函数内.在class的方法(构造.类方法.静态方法.实例方法)内(变量未加self修饰),这就是局 ...
- 『Python基础』第7节:基本运算符
一. 基本运算符 运算按种类可以分为: 算数运算.比较运算.逻辑运算.赋值运算.成员运算.身份运算.位运算. 今天我们只学习算数运算.比较运算.逻辑运算.赋值运算.成员运算 1.1 算数运算 以下假设 ...
- thrift原理与架构
是什么: 一个RPC框架.
- Centos7+puppet+foreman,模板介绍
一.简介 provision templates 是灵活部署合适的操作系统的核心,模板包括有好几类 1.模板种类 pxe相关的模板,比如pxelinux,pxegrub,pxegrub2 kickst ...
- Linux入职基础-1.2_U盘安装RedHat5具体步骤
从U盘安装RedHat5具体步骤 从U盘安装RedHat Linux的具体步骤: 准备工作: RHEL_5.6_i386_DVD.ISO文件 具体步骤: 1.解压并用ultraiso软件打开rhel- ...
- ABP 基于DDD的.NET开发框架 学习(四)时间控件采用datetimepicker注意事项
$('#datetimepicker1').datetimepicker({ format: 'yyyy/mm/dd hh:ii:ss',//这是只能用小写的大写的与ABP中的字母识别起冲突 loca ...
- SpringMVC源码解读
1.SpringMVC简介 SpringMVC框架是围绕一个DispatherServlet来设计的.这个Servlet会把请求分发给各个处理器,并支持可配置的处理器映射.视图渲染.本地化.时区与主题 ...
- sql server行转列
创建测试数据 学生表 Student create table Student(S# varchar(10),Sname nvarchar(10),Sage datetime,Ssex nvarcha ...