diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-27 15:31:09 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-27 15:46:49 +0100 |
commit | 68f6c87a27bd3616644368154914a683001f8aa6 (patch) | |
tree | d1db9fb50f9973b697c43c5c06935a5c5a9ff819 /client/src/main.ts | |
parent | acfa2e300defbf79994f49b2062ec6bece5ad1a9 (diff) | |
download | PeerTube-68f6c87a27bd3616644368154914a683001f8aa6.tar.gz PeerTube-68f6c87a27bd3616644368154914a683001f8aa6.tar.zst PeerTube-68f6c87a27bd3616644368154914a683001f8aa6.zip |
Various front optimizations
Diffstat (limited to 'client/src/main.ts')
-rw-r--r-- | client/src/main.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/main.ts b/client/src/main.ts index 2d1749c42..0fddf3aac 100644 --- a/client/src/main.ts +++ b/client/src/main.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { enableProdMode } from '@angular/core' | 1 | import { ApplicationRef, enableProdMode } from '@angular/core' |
2 | import { enableDebugTools } from '@angular/platform-browser' | ||
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' | 3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' |
3 | |||
4 | import { AppModule } from './app/app.module' | 4 | import { AppModule } from './app/app.module' |
5 | import { environment } from './environments/environment' | 5 | import { environment } from './environments/environment' |
6 | 6 | ||
@@ -27,6 +27,14 @@ const bootstrap = () => platformBrowserDynamic() | |||
27 | }) | 27 | }) |
28 | } | 28 | } |
29 | 29 | ||
30 | if (!environment.production) { | ||
31 | const applicationRef = bootstrapModule.injector.get(ApplicationRef) | ||
32 | const componentRef = applicationRef.components[0] | ||
33 | |||
34 | // allows to run `ng.profiler.timeChangeDetection();` | ||
35 | enableDebugTools(componentRef) | ||
36 | } | ||
37 | |||
30 | return bootstrapModule | 38 | return bootstrapModule |
31 | }) | 39 | }) |
32 | .catch(err => { | 40 | .catch(err => { |