diff options
author | Steve Klebanoff <steve@0xproject.com> | 2018-12-04 08:52:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-04 08:52:06 +0800 |
commit | 703cea6173f72ceb6969bc17bda0735b86477522 (patch) | |
tree | f73fb94c3de9e2718bcec5f5d0e0c736c1d11b28 /packages/instant/webpack.config.js | |
parent | 2601d16efbb1e85eadca459e5dc64e78099e738a (diff) | |
parent | 1107b84949ea74467393edc1496c153f5ce7f64d (diff) | |
download | dexon-sol-tools-703cea6173f72ceb6969bc17bda0735b86477522.tar dexon-sol-tools-703cea6173f72ceb6969bc17bda0735b86477522.tar.gz dexon-sol-tools-703cea6173f72ceb6969bc17bda0735b86477522.tar.bz2 dexon-sol-tools-703cea6173f72ceb6969bc17bda0735b86477522.tar.lz dexon-sol-tools-703cea6173f72ceb6969bc17bda0735b86477522.tar.xz dexon-sol-tools-703cea6173f72ceb6969bc17bda0735b86477522.tar.zst dexon-sol-tools-703cea6173f72ceb6969bc17bda0735b86477522.zip |
Merge pull request #1370 from 0xProject/feature/instant/explicitly-enable-heap-dev
[instant] Must explicitly specify when want to send to heap when developing
Diffstat (limited to 'packages/instant/webpack.config.js')
-rw-r--r-- | packages/instant/webpack.config.js | 2 |
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); |