This commit is contained in:
Zef Hemel
2023-01-01 11:28:25 -08:00
committed by GitHub
parent 8d3688b2fd
commit e4ebaa2cf4
9 changed files with 24 additions and 10 deletions
+2
View File
@@ -57,6 +57,8 @@ export class AssetBundle {
}
writeFileSync(path: string, data: Uint8Array) {
// Replace \ with / for windows
path = path.replaceAll("\\", "/");
const mimeType = mime.getType(path) || "application/octet-stream";
this.bundle[path] = base64EncodedDataUrl(mimeType, data);
}