aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/hmr.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-19 11:12:01 +0100
committerChocobozzz <me@florianbigard.com>2020-11-19 15:25:41 +0100
commit4f926722ea6784ea389013378fd233f59077ec8a (patch)
tree36e92da1d8fc9394e1e36144f206e0427b7c02c3 /client/src/hmr.ts
parentfce7fe04eed39e23e76717085e92118e963def81 (diff)
downloadPeerTube-4f926722ea6784ea389013378fd233f59077ec8a.tar.gz
PeerTube-4f926722ea6784ea389013378fd233f59077ec8a.tar.zst
PeerTube-4f926722ea6784ea389013378fd233f59077ec8a.zip
Upgrade client dependencies
Migrate removed primeng theme to custom CSS
Diffstat (limited to 'client/src/hmr.ts')
-rw-r--r--client/src/hmr.ts24
1 files changed, 0 insertions, 24 deletions
diff --git a/client/src/hmr.ts b/client/src/hmr.ts
deleted file mode 100644
index adfbca7d9..000000000
--- a/client/src/hmr.ts
+++ /dev/null
@@ -1,24 +0,0 @@
1import { NgModuleRef, ApplicationRef } from '@angular/core'
2import { createNewHosts } from '@angularclass/hmr'
3import { enableDebugTools } from '@angular/platform-browser'
4
5export const hmrBootstrap = (module: any, bootstrap: () => Promise<NgModuleRef<any>>) => {
6 let ngModule: NgModuleRef<any>
7 module.hot.accept()
8 bootstrap()
9 .then(mod => {
10 ngModule = mod
11
12 const applicationRef = ngModule.injector.get(ApplicationRef)
13 const componentRef = applicationRef.components[ 0 ]
14 // allows to run `ng.profiler.timeChangeDetection();`
15 enableDebugTools(componentRef)
16 })
17 module.hot.dispose(() => {
18 const appRef: ApplicationRef = ngModule.injector.get(ApplicationRef)
19 const elements = appRef.components.map(c => c.location.nativeElement)
20 const makeVisible = createNewHosts(elements)
21 ngModule.destroy()
22 makeVisible()
23 })
24}