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. Codeforces Round #325 (Div. 2) B

    B. Laurenty and Shop time limit per test 1 second memory limit per test 256 megabytes input standard ...

  2. js执行时间(调试)

    js 执行时间 function use_time(func) {    var start = new Date().getTime(); console.log(start);        fu ...

  3. Require.js 详细了解

    一.Require.js 作用 1.1.是JS 文件加载器,实现js脚本的AMD异步加载. 保证不阻塞页面的渲染和其后的脚本的执行,并提供了在加载完成之后的执行相应回调函数的功能. 1.2.实现JS. ...

  4. 修改Eclipse发布路劲(Deploy path)

    Eclipse默认的发布路劲在用户的workspace里,比较难找,为了方便查看,可以将发布路劲修改为自己想要的. 修改方法: 1.先stop Servers下tomcat里的项目,然后remove ...

  5. Andriod布局

    布局[ViewGroup]   像素单位的变化:是用dip,而不是px,主要用于宽高的设置 在Android中支持的描述大小区域的类型有以下几种. px(pixels)——像素:不同的设备显示效果相同 ...

  6. Python’s super() considered super!

    如果你没有被Python的super()惊愕过,那么要么是你不了解它的威力,要么就是你不知道如何高效地使用它. 有许多介绍super()的文章,这一篇与其它文章的不同之处在于: 提供了实例 阐述了它的 ...

  7. PHP将两个二维数组合并为一个二维数组的方法

    $a = array(0 => Array(id => 66,class_name => math),1 => Array(id => 67,class_name =&g ...

  8. vagrant virtualbox VM inaccessible解决办法

    vagrant无法访问的提示:Please open VirtualBox and clear out your inaccessible virtual machines or find a way ...

  9. J.U.C并发框架源码阅读(十五)CopyOnWriteArrayList

    基于版本jdk1.7.0_80 java.util.concurrent.CopyOnWriteArrayList 代码如下 /* * Copyright (c) 2003, 2011, Oracle ...

  10. 在CentOS 7上安装Node.js

    一.安装1.进入官网下载最新版本https://nodejs.org/en/ 选择下载后上传或直接使用wget下载 wget https://nodejs.org/dist/v8.11.2/node- ...