1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

prod environment settings

This commit is contained in:
Kyle Spearrin
2018-04-13 15:14:04 -04:00
parent 76eeb4e41d
commit dc35577564
6 changed files with 34 additions and 11 deletions

View File

@@ -9,8 +9,8 @@ require('../scripts/duo.js');
import { AppModule } from './app.module';
// if (!isDev()) {
// enableProdMode();
// }
if (process.env.ENV === 'production') {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@@ -80,10 +80,10 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
authService.init();
new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
const analytics = new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
const bgPage = BrowserApi.getBackgroundPage();
if (bgPage == null || bgPage.bitwardenMain == null) {
throw 'Cannot resolve background page main.';
throw new Error('Cannot resolve background page main.');
}
return bgPage.bitwardenMain;
});