From 210393d5f757fda368405cbffaf181b0569ef74c Mon Sep 17 00:00:00 2001 From: CodeLazier Date: Tue, 24 Nov 2026 16:17:07 +0800 Subject: [PATCH] Export the web page as index.html, the default entry on hosting platforms. Co-authored-by: Cursor --- editor/Exporter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/Exporter.cpp b/editor/Exporter.cpp index 6e2c3f93b..e8825706f 100644 --- a/editor/Exporter.cpp +++ b/editor/Exporter.cpp @@ -1578,7 +1578,8 @@ bool editor::Exporter::collectWebArtifacts() { setError("Built web output not found: " + src.string()); return false; } - fs::copy_file(src, config.destinationDir / (appName + ext), fs::copy_options::overwrite_existing, ec); + // Fixed as index.html, the default entry page on most hosting platforms. + fs::copy_file(src, config.destinationDir / (std::string(ext) == ".html" ? std::string("index.html") : appName + ext), fs::copy_options::overwrite_existing, ec); if (ec) { setError("Failed to copy " + src.filename().string() + ": " + ec.message()); return false;