Merge pull request #83165 from Faless/web/locatefile_fixes

[Web] Improve Emscripten `locateFile` glue.
This commit is contained in:
Rémi Verschelde 2023-10-11 22:44:58 +02:00
commit dde7deeeca
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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`;