[Angular] Debug Angular apps in production without revealing source maps
Build application with source map:
"build": "ng build --prod --source-map",
But now the source maps would be revealed in production. To hide them we simply create another folder in our dist
and move the source maps to it.
"postbuild": "mkdir dist/sourceMapInspector/sourceMaps; mv dist/sourceMapInspector/*.map dist/sourceMapInspector/sourceMaps"
In production, we can find the source map by manully enter the source map url on server, then use 'Add source map' from Chrome dev tool to add source map in our production app.
Then we can debug it as normal as in the developement env.
[Angular] Debug Angular apps in production without revealing source maps的更多相关文章
- ASP.NET Core 2.1 Web API + Identity Server 4 + Angular 6 + Angular Material 实战小项目视频
视频简介 ASP.NET Core Web API + Angular 6的教学视频 我是后端开发人员, 前端的Angular部分讲的比较差一些, 可以直接看代码!!!! 这是一个小项目的实战视频, ...
- angular 2 angular quick start Could not find HammerJS
Angular2 的material中 引用了 hammerjs,遇到Could not find HammerJS错误,正确的步骤如下: 需要在如下位置增加 对material 和 hammerjs ...
- [AngualrJS + Webpack] Production Source Maps
When you uglify your Angular code with Webpack's uglify plugin, debugging your application can be a ...
- php angular/think angular/php模版引擎
在thinphp5中发现一个好用的模版引擎—think-angular, 此模板引擎主要特点是 不需要额外的标签定义, 全部使用属性定义, 写好的模板文件在IDE格式化代码的时候很整洁, 因为套完的模 ...
- angular+selecte2(angular ng-repeat渲染)
一.页面代码 <select id="sponsorId" select2 ng-model="sponsorSelectedObj" ng-change ...
- [Angular 2] Angular 2 Smart Components vs Presentation Components
Both Smart Components and Presentation Components receive data from Services in entirely different w ...
- Intergate flot with Angular js ——Angular 图形报表
下面这篇文章最终的结论就是 Flot 插件 结合 Angular 的Directive 来处理 图表的绘制 给出github上的一个demo源码.https://gist.github.com/fly ...
- Angular - - ngRoute Angular自带的路由
ngRoute $routeProvider 配置路由的时候使用. 方法: when(path,route); 在$route服务里添加一个新的路由. path:该路由的路径. route:路由映射信 ...
- @angular/cli (angular脚手架) 如何降级
1.卸载 npm uninstall -g @angular/cli 2.清除缓存 npm cache verify 3.查看是否卸载成功 ng v //如果显示ng 不是内部或外部的指令 则证明卸载 ...
随机推荐
- hibernate用配置文件的方式实现orm
本文主要讲用配置文件的方式讲如何把一个对象和数据库中的表关联起来,其实用配置文件本质是和用注解的方式是一样的. 思路:1.写一个domain对象(如Person.java) 2.写这个domain对象 ...
- Change hostname and IP on Soalris10
To see the existing configuration: # ifconfig -a Update the following files for IP Address: /etc/hos ...
- Math对象常用方法
1.Math.ceil(x) 返回x的向上取整. var a=Math.ceil(9.1); var b=Math.ceil(-9.1) console.log(a); console.log(b); ...
- 模拟Json格式传值请求与数据接收
a.php代码: function http_post_json($url, $jsonStr) { $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, ...
- 【Git】GitHub的SSH提交配置[
Git可以通过https方式和ssh方式连接服务器上的仓库. 两者比较: 1.https: 比较方便,但是每次fetch和push代码都需要输入账号和密码,略显麻烦 2.ssh: 传输前压缩数据,传输 ...
- windows 自动关机
按WIN+R在窗口中输入:shutdown -S -T 3600 然后回车.即可在一小时后关机,如果你想在半个小时后关机,那么就把3600改成1800单位是秒
- 不错的usb分析工具!!!---用bus hound分析usb的枚举过程【转】
转自:http://blog.chinaunix.net/uid-25909619-id-3335199.html 说明:由于分析时是在记事本上分析的,贴到这里出现了格式有点乱,看时请复制到记事本中, ...
- UbuntuMate开机自动启动ssh服务
在文件/etc/init/ssh.conf中,有一句 start on filesystem or runlevel [2345] 如果想关闭自动启动的话,把这一局修改为start on runlev ...
- 51nod 1051 最大子矩阵和 【最大子段和DP变形/降维】
[题目]: 一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值. 例如:*3的矩阵: - - - - 和最大的子矩阵是: - - Input 第1行:M和N, ...
- Python与数据库[1] -> 数据库接口/DB-API[0] -> 通用标准
数据库接口 / DB-API 在Python中,数据库是通过适配器(Adaptor)来连接访问数据库的,适配器通常与数据库客户端接口(通常为C语言编写)想连接,而不同的适配器都会尽量满足相同的DB-A ...