summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2019-07-04 13:36:49 +0200
committerLukas Eipert <leipert@gitlab.com>2019-07-05 16:37:39 +0200
commit7ca77203c0622697123e2fdb6f377d87e3de901b (patch)
tree73b4ae76d125135e0cbca3eb521a7b2f3e15d391 /config
parentde6c2f7033e7d856be092e3bca4cfe7a33141733 (diff)
downloadgitlab-ce-7ca77203c0622697123e2fdb6f377d87e3de901b.tar.gz
Replace runtime isEE check with compile time one60213-fix-is-ee-webpack-checks
This has the benefit that CE bundles will remove dead code in CE only builds. We have a follow-up issue to get rid of this completely: https://gitlab.com/gitlab-org/gitlab-ce/issues/64173
Diffstat (limited to 'config')
-rw-r--r--config/webpack.config.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 19b48845305..a81590e8b8e 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -322,7 +322,10 @@ module.exports = {
}),
new webpack.DefinePlugin({
+ // This one is used to define window.gon.ee and other things properly in tests:
'process.env.IS_GITLAB_EE': JSON.stringify(IS_EE),
+ // This one is used to check against "EE" properly in application code
+ IS_EE: IS_EE ? 'window.gon && window.gon.ee' : JSON.stringify(false),
}),
].filter(Boolean),