diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-10-11 21:16:17 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-10-11 21:21:34 +0200 |
commit | bb69f0c090487bca069fae1694a37e08ac953d84 (patch) | |
tree | 8bb13a6e65a27eabe92aa8c2f3fe7af8ce2b998d /platform/web | |
parent | 4b7cc99bc195387c784efced7fdd360501d9a5cf (diff) | |
download | redot-engine-bb69f0c090487bca069fae1694a37e08ac953d84.tar.gz |
[Web] Improve emscripten "locateFile" glue.
Be more selective on what we rewrite, since in recent emscripten
versions loading dynamic libraries relies on it.
Diffstat (limited to 'platform/web')
-rw-r--r-- | platform/web/js/engine/config.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/web/js/engine/config.js b/platform/web/js/engine/config.js index 6a30c253fb..0b6626968e 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`; |