aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/main.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-27 15:31:09 +0100
committerChocobozzz <me@florianbigard.com>2020-11-27 15:46:49 +0100
commit68f6c87a27bd3616644368154914a683001f8aa6 (patch)
treed1db9fb50f9973b697c43c5c06935a5c5a9ff819 /client/src/main.ts
parentacfa2e300defbf79994f49b2062ec6bece5ad1a9 (diff)
downloadPeerTube-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.ts12
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 @@
1import { enableProdMode } from '@angular/core' 1import { ApplicationRef, enableProdMode } from '@angular/core'
2import { enableDebugTools } from '@angular/platform-browser'
2import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' 3import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
3
4import { AppModule } from './app/app.module' 4import { AppModule } from './app/app.module'
5import { environment } from './environments/environment' 5import { 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 => {