From 4e03a5794e9c11b99545cce3df4c6b928e522965 Mon Sep 17 00:00:00 2001 From: Johannes Hoppe Date: Fri, 13 Jan 2017 16:50:37 +0100 Subject: [PATCH] Load zone.js long-stack-trace in debug mode [dist/long-stack-trace-zone.min.js](https://github.com/angular/zone.js/blob/master/dist/long-stack-trace-zone.min.js) should be loaded in the development environment to give more meaningful stack traces. Without this script, only the last VM turn is logged. When this script is loaded the stack will contain all VM turns from the point the async operation was initiated. fixes #2233 --- packages/angular-cli/blueprints/ng2/files/__path__/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/angular-cli/blueprints/ng2/files/__path__/main.ts b/packages/angular-cli/blueprints/ng2/files/__path__/main.ts index ac78a713c2d1..2032cb17a6a8 100644 --- a/packages/angular-cli/blueprints/ng2/files/__path__/main.ts +++ b/packages/angular-cli/blueprints/ng2/files/__path__/main.ts @@ -7,6 +7,8 @@ import { AppModule } from './app/app.module'; if (environment.production) { enableProdMode(); +} else { + require('zone.js/dist/long-stack-trace-zone'); } platformBrowserDynamic().bootstrapModule(AppModule);