From c08a8a072ca58a3f50ca93b1414068f057533a16 Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Mon, 22 Jan 2018 14:26:45 -0800 Subject: [PATCH] [DEV-BUGFIX] Fix instrumentation when running in production (#5333) * fix production instrumented builds --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index cafe40a0fdc..bb18ce28210 100644 --- a/index.js +++ b/index.js @@ -35,6 +35,10 @@ function isProductionEnv() { return isProd && !isTest; } +function isInstrumentedBuild() { + return INSTRUMENT_HEIMDALL; +} + module.exports = { name: 'ember-data', @@ -137,7 +141,7 @@ module.exports = { let withoutPrivate = new Funnel(treeWithVersion, { exclude: [ '-private', - isProductionEnv() ? '-debug' : false + isProductionEnv() && !isInstrumentedBuild() ? '-debug' : false ].filter(Boolean), destDir: 'ember-data'