You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
[Web] Improve emscripten "locateFile" glue.
Be more selective on what we rewrite, since in recent emscripten versions loading dynamic libraries relies on it.
This commit is contained in:
@@ -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`;
|
||||||
|
|||||||
Reference in New Issue
Block a user