1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

enable prod mode on production env

This commit is contained in:
Kyle Spearrin 2018-06-05 00:31:06 -04:00
parent 22c1b0627e
commit 9cafb76781
3 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,8 @@ require('../scss/styles.scss');
import { AppModule } from './app.module';
// enableProdMode(); // TODO: if production
if (process.env.ENV === 'production') {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule);

1
src/global.d.ts vendored
View File

@ -1,3 +1,4 @@
declare function escape(s: string): string;
declare function unescape(s: string): string;
declare var require: any;
declare var process: any;

View File

@ -7,7 +7,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
if (process.env.NODE_ENV == null || process.env.WEBPACK_SERVE) {
if (process.env.NODE_ENV == null) {
process.env.NODE_ENV = 'development';
}
const ENV = process.env.ENV = process.env.NODE_ENV;