From 1f502c12441938c2c6380a2267f1cabd4f2c9733 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 13 Feb 2020 19:25:33 -0500 Subject: [PATCH] Compat: Respect SCRIPT_DEBUG for minified suffix --- lib/compat.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/compat.php b/lib/compat.php index 7362ca9b890741..19bb29d5d1566a 100644 --- a/lib/compat.php +++ b/lib/compat.php @@ -55,10 +55,12 @@ function gutenberg_add_url_polyfill( $scripts ) { return; } + $suffix = SCRIPT_DEBUG ? '' : '.min'; + gutenberg_register_vendor_script( $scripts, 'wp-polyfill-url', - 'https://unpkg.com/core-js-url-browser@3.6.4/url.min.js', + 'https://unpkg.com/core-js-url-browser@3.6.4/url' . $suffix . '.js', array(), '3.6.4' );