From bb69f0c090487bca069fae1694a37e08ac953d84 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 11 Oct 2023 21:16:17 +0200 Subject: [PATCH] [Web] Improve emscripten "locateFile" glue. Be more selective on what we rewrite, since in recent emscripten versions loading dynamic libraries relies on it. --- platform/web/js/engine/config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/web/js/engine/config.js b/platform/web/js/engine/config.js index 6a30c253fbf..0b6626968ef 100644 --- a/platform/web/js/engine/config.js +++ b/platform/web/js/engine/config.js @@ -292,7 +292,9 @@ const InternalConfig = function (initConfig) { // eslint-disable-line no-unused- return {}; }, 'locateFile': function (path) { - if (path.endsWith('.worker.js')) { + if (!path.startsWith('godot.')) { + return path; + } else if (path.endsWith('.worker.js')) { return `${loadPath}.worker.js`; } else if (path.endsWith('.audio.worklet.js')) { return `${loadPath}.audio.worklet.js`;