Browse Source

Merge pull request #83165 from Faless/web/locatefile_fixes

[Web] Improve Emscripten `locateFile` glue.
Rémi Verschelde 1 year ago
parent
commit
dde7deeeca
1 changed files with 3 additions and 1 deletions
  1. 3 1
      platform/web/js/engine/config.js

+ 3 - 1
platform/web/js/engine/config.js

@@ -292,7 +292,9 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused-
 				return {};
 				return {};
 			},
 			},
 			'locateFile': function (path) {
 			'locateFile': function (path) {
-				if (path.endsWith('.worker.js')) {
+				if (!path.startsWith('godot.')) {
+					return path;
+				} else if (path.endsWith('.worker.js')) {
 					return `${loadPath}.worker.js`;
 					return `${loadPath}.worker.js`;
 				} else if (path.endsWith('.audio.worklet.js')) {
 				} else if (path.endsWith('.audio.worklet.js')) {
 					return `${loadPath}.audio.worklet.js`;
 					return `${loadPath}.audio.worklet.js`;