diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-13 12:16:00 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-13 12:16:00 +0100 |
commit | c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24 (patch) | |
tree | e5177a26dae755833122c4ef73744c2a7f9b53fc /client/src/app/environment.ts | |
parent | 80deae8d198f6a376b477d780e76966f8fbb72ce (diff) | |
download | PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.tar.gz PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.tar.zst PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.zip |
Client: add basic aot support
Diffstat (limited to 'client/src/app/environment.ts')
-rw-r--r-- | client/src/app/environment.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/src/app/environment.ts b/client/src/app/environment.ts index 8bba89c4e..929e09490 100644 --- a/client/src/app/environment.ts +++ b/client/src/app/environment.ts | |||
@@ -4,19 +4,24 @@ | |||
4 | import { enableDebugTools, disableDebugTools } from '@angular/platform-browser'; | 4 | import { enableDebugTools, disableDebugTools } from '@angular/platform-browser'; |
5 | import { enableProdMode, ApplicationRef } from '@angular/core'; | 5 | import { enableProdMode, ApplicationRef } from '@angular/core'; |
6 | // Environment Providers | 6 | // Environment Providers |
7 | let PROVIDERS = [ | 7 | let PROVIDERS: any[] = [ |
8 | // common env directives | 8 | // common env directives |
9 | ]; | 9 | ]; |
10 | 10 | ||
11 | // Angular debug tools in the dev console | 11 | // Angular debug tools in the dev console |
12 | // https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md | 12 | // https://github.com/angular/angular/blob/86405345b781a9dc2438c0fbe3e9409245647019/TOOLS_JS.md |
13 | let _decorateModuleRef = function identity(value) { return value; }; | 13 | let _decorateModuleRef = function identity<T>(value: T): T { return value; }; |
14 | 14 | ||
15 | if ('production' === ENV) { | 15 | if ('production' === ENV) { |
16 | // Production | ||
17 | disableDebugTools(); | ||
18 | enableProdMode(); | 16 | enableProdMode(); |
19 | 17 | ||
18 | // Production | ||
19 | _decorateModuleRef = (modRef: any) => { | ||
20 | disableDebugTools(); | ||
21 | |||
22 | return modRef; | ||
23 | }; | ||
24 | |||
20 | PROVIDERS = [ | 25 | PROVIDERS = [ |
21 | ...PROVIDERS, | 26 | ...PROVIDERS, |
22 | // custom providers in production | 27 | // custom providers in production |