From 276ebe895e9a033c853d7bee9bdad6c152322100 Mon Sep 17 00:00:00 2001
From: Frankly George <54015-franklygeorge@users.noreply.gitgud.io>
Date: Sun, 5 May 2024 21:29:35 +0000
Subject: [PATCH] Fix compiler sourcemap paths

---
 gulpfile.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js
index 2e167e4b33a..28f6b9c312b 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -218,7 +218,7 @@ function concatFiles(srcGlob, destDir, destFileName) {
  */
 function processScripts(srcGlob, destDir, destFileName) {
 	const addSourcemaps = !args.release;
-	const prefix = path.relative(destDir, srcGlob.substr(0, srcGlob.indexOf("*")));
+	const prefix = `../${srcGlob.split("/")[0]}`;
 
 	if (args.injectLiveReload === true && destFileName === "module-script.js") {
 		const liveReloadScriptPath = "devTools/scripts/watcherLiveReload.js";
@@ -268,7 +268,7 @@ function processScripts(srcGlob, destDir, destFileName) {
  */
 function processStylesheets(srcGlob, destDir, destFileName) {
 	const addSourcemaps = !args.release;
-	const prefix = path.relative(destDir, srcGlob.substr(0, srcGlob.indexOf("*")));
+	const prefix = `../${srcGlob.split("/")[0]}`;
 
 	return gulp.src(srcGlob)
 		.pipe(args.debug
-- 
GitLab