Skip to content

Commit

Permalink
Merge pull request #83165 from Faless/web/locatefile_fixes
Browse files Browse the repository at this point in the history
[Web] Improve Emscripten `locateFile` glue.
  • Loading branch information
akien-mga committed Oct 11, 2023
2 parents 2c79bc6 + bb69f0c commit dde7dee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/web/js/engine/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down

0 comments on commit dde7dee

Please sign in to comment.