Source: https://blog.angularindepth.com/debug-angular-apps-in-production-without-revealing-source-maps-ab4a235edd85

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的更多相关文章

  1. ASP.NET Core 2.1 Web API + Identity Server 4 + Angular 6 + Angular Material 实战小项目视频

    视频简介 ASP.NET Core Web API + Angular 6的教学视频 我是后端开发人员, 前端的Angular部分讲的比较差一些, 可以直接看代码!!!! 这是一个小项目的实战视频, ...

  2. angular 2 angular quick start Could not find HammerJS

    Angular2 的material中 引用了 hammerjs,遇到Could not find HammerJS错误,正确的步骤如下: 需要在如下位置增加 对material 和 hammerjs ...

  3. [AngualrJS + Webpack] Production Source Maps

    When you uglify your Angular code with Webpack's uglify plugin, debugging your application can be a ...

  4. php angular/think angular/php模版引擎

    在thinphp5中发现一个好用的模版引擎—think-angular, 此模板引擎主要特点是 不需要额外的标签定义, 全部使用属性定义, 写好的模板文件在IDE格式化代码的时候很整洁, 因为套完的模 ...

  5. angular+selecte2(angular ng-repeat渲染)

    一.页面代码 <select id="sponsorId" select2 ng-model="sponsorSelectedObj" ng-change ...

  6. [Angular 2] Angular 2 Smart Components vs Presentation Components

    Both Smart Components and Presentation Components receive data from Services in entirely different w ...

  7. Intergate flot with Angular js ——Angular 图形报表

    下面这篇文章最终的结论就是 Flot 插件 结合 Angular 的Directive 来处理 图表的绘制 给出github上的一个demo源码.https://gist.github.com/fly ...

  8. Angular - - ngRoute Angular自带的路由

    ngRoute $routeProvider 配置路由的时候使用. 方法: when(path,route); 在$route服务里添加一个新的路由. path:该路由的路径. route:路由映射信 ...

  9. @angular/cli (angular脚手架) 如何降级

    1.卸载 npm uninstall -g @angular/cli 2.清除缓存 npm cache verify 3.查看是否卸载成功 ng v //如果显示ng 不是内部或外部的指令 则证明卸载 ...

随机推荐

  1. 《c程序设计语言》读书笔记-3.5-按要求进制位数字转字符串

    #include <io.h> #include <stdio.h> #include <string.h> #include <stdlib.h> # ...

  2. Python实现求矩阵路径最小和,使用动态规划

    题目: 给定一些NxN的矩阵,对于任意的路线,定义其[和]为其线路上所有节点的数字的和,计算从左上角到右下角的路线和最小值.每条路线只能从某一点到其周围(上下左右)的点,不可斜行.例如: 4,6 2, ...

  3. C语言fopen函数了解

    fopen()函数功能:open a file. 原型:FILE * fopen(const char * path,const char * mode); 需要#include<stdio.h ...

  4. 使用matlab判断男声与女声

    (转自) http://wenku.baidu.com/view/1d55480fbe1e650e52ea99a3.html %filename:manwoman.m %different man f ...

  5. git 克隆一个新仓库

    1.登陆git网页版,点击右上角创建新项目 2.更改project path(如果需要),填写project name,其它选项默认. 3.到本地要创建存放项目的目录下,打开git命令框,输入git ...

  6. Java微信公众平台开发_01_本地服务器映射外网

    做微信开发之前,我们需要先做一个内网穿透,让我们的工程可以在公网上被访问. 一.工具列表 内网穿透的相关工具有: (1)natapp 官网 :https://natapp.cn/ (2)花生壳 官网: ...

  7. 异步 JavaScript 之理解 macrotask 和 microtask(转)

    这个知识点... https://blog.keifergu.me/2017/03/23/difference-between-javascript-macrotask-and-microtask/? ...

  8. thinkphp函数学习(2)——microtime, memory_get_usage, dirname, strtolower, is_file

    1. microtime() 返回  微秒 秒  这种格式的内容 例子 <?php echo(microtime()); ?> 输出: 0.25139300 1138197510 // 前 ...

  9. 牛客网 暑期ACM多校训练营(第一场)A.Monotonic Matrix-矩阵转化为格子路径的非降路径计数,Lindström-Gessel-Viennot引理-组合数学

    牛客网暑期ACM多校训练营(第一场) A.Monotonic Matrix 这个题就是给你一个n*m的矩阵,往里面填{0,1,2}这三种数,要求是Ai,j⩽Ai+1,j,Ai,j⩽Ai,j+1 ,问你 ...

  10. kuangbin系列【简单搜索】

    poj-1321棋盘问题[bfs/回溯] Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 36385   Accepted:  ...