diff --git a/bin/build-mb/build.clj b/bin/build-mb/build.clj
index 432d6a1b3f686e4b2a10bb83146bb25857d58f8c..ff932c931eaf0a9390aa27408713d35b5ff03393 100644
--- a/bin/build-mb/build.clj
+++ b/bin/build-mb/build.clj
@@ -15,15 +15,24 @@
     (u/sh {:dir u/project-root-directory} "./bin/i18n/build-translation-resources")
     (u/announce "Translation resources built successfully.")))
 
+(defn- edition-from-env-var []
+  ;; MB_EDITION is either oss/ee, but the Clojure build scripts currently use :ce/:ee
+  (if-not (env/env :mb-edition)
+    :ce
+    (case (env/env :mb-edition)
+      "oss" :ce
+      "ee"  :ee)))
+
 (defn- build-frontend! []
   (u/step "Build frontend"
     (u/step "Run 'yarn' to download javascript dependencies"
       (u/sh {:dir u/project-root-directory} "yarn"))
     (u/step "Run 'webpack' with NODE_ENV=production to assemble and minify frontend assets"
       (u/sh {:dir u/project-root-directory
-             :env {"PATH"     (env/env :path)
-                   "HOME"     (env/env :user-home)
-                   "NODE_ENV" "production"}}
+             :env {"PATH"       (env/env :path)
+                   "HOME"       (env/env :user-home)
+                   "NODE_ENV"   "production"
+                   "MB_EDITION" (name (edition-from-env-var))}}
             "./node_modules/.bin/webpack" "--bail"))
     (u/announce "Frontend built successfully.")))
 
@@ -77,14 +86,6 @@
        (step-fn {:version version, :edition edition}))
      (u/announce "All build steps finished."))))
 
-(defn- edition-from-env-var []
-  ;; MB_EDITION is either oss/ee, but the Clojure build scripts currently use :ce/:ee
-  (if-not (env/env :mb-edition)
-    :ce
-    (case (env/env :mb-edition)
-      "oss" :ce
-      "ee"  :ee)))
-
 (defn -main [& steps]
   (u/exit-when-finished-nonzero-on-exception
     (build! (merge {:edition (edition-from-env-var)}