diff --git a/SOURCES/1004-Use-uglifyjs-on-CentOS-too.patch b/SOURCES/1004-Use-uglifyjs-on-CentOS-too.patch
new file mode 100644
index 0000000..3015604
--- /dev/null
+++ b/SOURCES/1004-Use-uglifyjs-on-CentOS-too.patch
@@ -0,0 +1,28 @@
+From ae328c389488daff0f2b4f35065d2c14725b9e0b Mon Sep 17 00:00:00 2001
+From: Carl George <carl@george.computer>
+Date: Fri, 18 Dec 2020 23:27:26 -0600
+Subject: [PATCH] Use uglifyjs on CentOS too
+
+Only checking for ID to equal "rhel" causes build failures on CentOS
+Stream.  Instead check both ID and ID_LIKE.  This should also work later
+on when rebuilds like CentOS Linux get this update.
+---
+ install/ui/util/compile.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/install/ui/util/compile.sh b/install/ui/util/compile.sh
+index 49c9dd875..435dc14f1 100755
+--- a/install/ui/util/compile.sh
++++ b/install/ui/util/compile.sh
+@@ -111,7 +111,7 @@ fi
+ # compile using python rjsmin on most platforms and uglify-js on RHEL 8
+ echo "Minimizing: $RDIR/$RELEASE/$LAYER.js"
+ echo "Target file: $OUTPUT_FILE"
+-if [ $ID = "rhel" ]; then
++if [[ "$ID" == "rhel" ]] || [[ "$ID_LIKE" =~ "rhel" ]]; then
+     echo "Minifier: uglifyjs"
+     uglifyjs < $RDIR/$RELEASE/$LAYER.js > $OUTPUT_FILE
+ else
+-- 
+2.29.2
+
diff --git a/SPECS/ipa.spec b/SPECS/ipa.spec
index c6386f4..b1116a6 100644
--- a/SPECS/ipa.spec
+++ b/SPECS/ipa.spec
@@ -198,6 +198,7 @@ Source1:        https://releases.pagure.org/freeipa/freeipa-%{version}%{?rc_vers
 Patch1001:      1001-Change-branding-to-IPA-and-Identity-Management.patch
 Patch1002:      1002-4.8.0-Remove-csrgen.patch
 Patch1003:      1003-Revert-WebUI-use-python3-rjsmin-to-minify-JavaScript.patch
+Patch1004:      1004-Use-uglifyjs-on-CentOS-too.patch
 %endif
 # RHEL spec file only: END