Skip to content

Commit 0826d5a

Browse files
petarblazevskijohannes.werner
authored andcommitted
chore(broccoli): Load different env config files
Fix angular#899 Close angular#913
1 parent 06f8576 commit 0826d5a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/broccoli/angular2-app.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,14 @@ class Angular2App extends BroccoliPlugin {
393393
* @return {Tree} The config files tree.
394394
*/
395395
_getConfigTree() {
396-
const isProduction = loadEnvironment(this.project).production;
397-
var envConfigFile = isProduction ? 'environment.prod.ts' : 'environment.dev.ts';
396+
let env = process.env['EMBER_ENV'] || 'dev';
397+
398+
switch (env) {
399+
case 'production': env = 'prod'; break;
400+
case 'development': env = 'dev'; break;
401+
}
402+
403+
var envConfigFile = `environment.${env}.ts`;
398404

399405
return new BroccoliFunnel('config', {
400406
include: [envConfigFile],

0 commit comments

Comments
 (0)