瀏覽代碼

replace flutter base in public channel

Melon 1 年之前
父節點
當前提交
80d12cad38
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      fisp/PackageHandler.cs

+ 5 - 0
fisp/PackageHandler.cs

@@ -160,6 +160,11 @@ namespace fisp
                 .Replace("href=\"flyinsono.ico", $"href=\"{staticRoot}flyinsono.ico")
                 .Replace("window.STATIC_ROOT = './';", $"window.STATIC_ROOT = '{staticRoot}';");
 
+            if (!IsEmbedded)
+            {
+                content = content.Replace("base href=\"/\"", $"base href=\"{staticRoot}\"");
+            }
+
             File.Delete(filePath);
 
             using (var fs = new FileStream(filePath, FileMode.CreateNew, FileAccess.Write, FileShare.None))