diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bfffd8314f052e1b4af7cd00e358b6d110e11ac7..ab3b2934c3c9bb1d65c0b11a9a75219072a2f547 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,7 +37,7 @@ autoupdate:
   - meteor --version
   - cd rocketchat && YARN_CHECKSUM_BEHAVIOR=update yarn install --json && git diff yarn.lock && cd ..
   # yarn build:ci uses hard-coded /tmp/dist directory for build output
-  - cd rocketchat && yarn build:ci && cd .. && mv /tmp/dist ./build
+  - cd rocketchat && yarn build:ci --env-mode=loose && cd .. && mv /tmp/dist ./build
   - cd build/bundle/programs/server/ && npm install --production && cd ../../../..
   artifacts:
     paths: