diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-03-11 18:24:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 18:24:55 +0100 |
commit | aeff25f3134c1af34285bb1021c709936cf5377d (patch) | |
tree | 1dbbb9e75cd26db30587a50945012a87af5eae61 /platform/javascript/export/export.cpp | |
parent | 98cdf50a5591e7629bde7688ceda82b15bd9e858 (diff) | |
parent | 919bbf8077e25b9250bf3ee84220b3c4b46a3e3f (diff) |
Merge pull request #36983 from Faless/js/threads_and_more
[HTML5] Refactor JS, threads support, closures.
Diffstat (limited to 'platform/javascript/export/export.cpp')
-rw-r--r-- | platform/javascript/export/export.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index f0326d5027..da61425747 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -94,6 +94,9 @@ public: } else if (req[1] == basereq + ".js") { filepath += ".js"; ctype = "application/javascript"; + } else if (req[1] == basereq + ".worker.js") { + filepath += ".worker.js"; + ctype = "application/javascript"; } else if (req[1] == basereq + ".pck") { filepath += ".pck"; ctype = "application/octet-stream"; @@ -432,6 +435,10 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese } else if (file == "godot.js") { file = p_path.get_file().get_basename() + ".js"; + } else if (file == "godot.worker.js") { + + file = p_path.get_file().get_basename() + ".worker.js"; + } else if (file == "godot.wasm") { file = p_path.get_file().get_basename() + ".wasm"; @@ -563,6 +570,7 @@ Error EditorExportPlatformJavaScript::run(const Ref<EditorExportPreset> &p_prese // Export generates several files, clean them up on failure. DirAccess::remove_file_or_error(basepath + ".html"); DirAccess::remove_file_or_error(basepath + ".js"); + DirAccess::remove_file_or_error(basepath + ".worker.js"); DirAccess::remove_file_or_error(basepath + ".pck"); DirAccess::remove_file_or_error(basepath + ".png"); DirAccess::remove_file_or_error(basepath + ".wasm"); |