perf: load jszip dynamically

This commit is contained in:
Azgaar 2022-06-04 00:42:16 +03:00
parent 8735ca8a3e
commit ac063d4f07
3 changed files with 4 additions and 4 deletions

View file

@ -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");