Skip to content

Commit

Permalink
Merge pull request #18304 from emberjs/bugfix/check-ember-env-at-corr…
Browse files Browse the repository at this point in the history
…ect-time

[BUGFIX lts] Check the EMBER_ENV environment variable after it is set
  • Loading branch information
rwjblue authored Aug 23, 2019
2 parents 6fb17f5 + a5937c7 commit 66ed9ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const buildDebugMacroPlugin = require('./build-debug-macro-plugin');
const buildStripClassCallcheckPlugin = require('./build-strip-class-callcheck-plugin');
const injectBabelHelpers = require('./transforms/inject-babel-helpers');

const isProduction = process.env.EMBER_ENV === 'production';

const PRE_BUILT_TARGETS = [
'last 1 Chrome versions',
'last 1 Firefox versions',
Expand Down Expand Up @@ -171,6 +169,8 @@ module.exports = {
let ember;
let targets = (this.project && this.project.targets && this.project.targets.browsers) || [];

const isProduction = process.env.EMBER_ENV === 'production';

if (
!isProduction &&
(PRE_BUILT_TARGETS.every(target => targets.includes(target)) &&
Expand Down

0 comments on commit 66ed9ab

Please sign in to comment.