From ac063d4f07b14f10537ae654db7992c098283bbc Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 4 Jun 2022 00:42:16 +0300 Subject: [PATCH] perf: load jszip dynamically --- index.html | 3 +-- modules/io/export.js | 3 ++- versioning.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 60807aa0..c8320121 100644 --- a/index.html +++ b/index.html @@ -6163,12 +6163,11 @@ - - + diff --git a/modules/io/export.js b/modules/io/export.js index 2389b89e..fded29db 100644 --- a/modules/io/export.js +++ b/modules/io/export.js @@ -75,7 +75,8 @@ async function saveTiles() { return new Promise(async (resolve, reject) => { // download schema const urlSchema = await getMapURL("tiles", {debug: true, fullMap: true}); - const zip = new JSZip(); + await import("../../libs/jszip.min.js"); + const zip = new window.JSZip(); const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); diff --git a/versioning.js b/versioning.js index aa41662b..f60cbf5c 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.84.10"; // generator version, update each time +const version = "1.84.11"; // generator version, update each time { document.title += " v" + version;