aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/webpack.config.js
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-04 06:53:25 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-04 06:53:25 +0800
commit239116eec47482807029c14b08f2ac6bb72b47d2 (patch)
tree7137631dfe3eba620b21ba148af119fb486b34e9 /packages/instant/webpack.config.js
parent50df67e7511460f051f91785bb4384485077ef60 (diff)
downloaddexon-sol-tools-239116eec47482807029c14b08f2ac6bb72b47d2.tar
dexon-sol-tools-239116eec47482807029c14b08f2ac6bb72b47d2.tar.gz
dexon-sol-tools-239116eec47482807029c14b08f2ac6bb72b47d2.tar.bz2
dexon-sol-tools-239116eec47482807029c14b08f2ac6bb72b47d2.tar.lz
dexon-sol-tools-239116eec47482807029c14b08f2ac6bb72b47d2.tar.xz
dexon-sol-tools-239116eec47482807029c14b08f2ac6bb72b47d2.tar.zst
dexon-sol-tools-239116eec47482807029c14b08f2ac6bb72b47d2.zip
feat(instant): have to use INSTANT_HEAP_FORCE_DEVELOPMENT to report to heap in development
Diffstat (limited to 'packages/instant/webpack.config.js')
-rw-r--r--packages/instant/webpack.config.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js
index a1db01db9..e74cf36d9 100644
--- a/packages/instant/webpack.config.js
+++ b/packages/instant/webpack.config.js
@@ -71,6 +71,7 @@ const generateConfig = (dischargeTarget, heapConfigOptions, rollbarConfigOptions
`Must define heap analytics id in ENV var ${heapAnalyticsIdEnvName} when building for ${dischargeTarget}`,
);
}
+ const heapEnabled = heapAnalyticsId && (nodeEnv !== 'development' || process.env.INSTANT_HEAP_FORCE_DEVELOPMENT);
const rollbarTokens = getRollbarTokens(dischargeTarget, rollbarConfigOptions.rollbarRequired);
const rollbarEnabled =
@@ -92,6 +93,7 @@ const generateConfig = (dischargeTarget, heapConfigOptions, rollbarConfigOptions
GIT_SHA: JSON.stringify(GIT_SHA),
NPM_PACKAGE_VERSION: JSON.stringify(process.env.npm_package_version),
ROLLBAR_ENABLED: rollbarEnabled,
+ HEAP_ENABLED: heapEnabled
};
if (dischargeTarget) {
envVars.INSTANT_DISCHARGE_TARGET = JSON.stringify(dischargeTarget);