perf: lazy load support bundle zip

This commit is contained in:
Peter Steinberger
2026-04-25 12:48:01 +01:00
parent 1888242bd3
commit 2b8105598e

View File

@@ -1,6 +1,5 @@
import fs from "node:fs";
import path from "node:path";
import JSZip from "jszip";
export type DiagnosticSupportBundleFile = {
path: string;
@@ -132,6 +131,7 @@ export async function writeSupportBundleZip(params: {
files: readonly DiagnosticSupportBundleFile[];
compressionLevel?: number;
}): Promise<number> {
const { default: JSZip } = await import("jszip");
const zip = new JSZip();
for (const file of params.files) {
zip.file(assertSafeBundleRelativePath(file.path), file.content);