From 800a6ec98262cc7e46582efbab785b38eb96457c Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 29 Apr 2022 10:02:26 -0700 Subject: [PATCH] Rename sourcemap files when renaming mjs to js --- Gruntfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Gruntfile.js b/Gruntfile.js index 35d6aaa10..dc13b340f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -40,6 +40,7 @@ module.exports = function (grunt) { 'for mjs in wp-includes/js/workbox*/*.mjs; do ' + 'sed "s/\\.mjs/.js/g" "$mjs" > "${mjs%mjs}js";' + 'rm $mjs;' + + 'if [ -e $mjs.map ]; then mv $mjs.map "${mjs%mjs}js.map"; fi;' + 'done;', }, create_build_zip: {