Workaround for broken dynamic imports on Safari 17.2

This commit is contained in:
Foxster
2023-12-14 19:33:38 -08:00
parent 097ffb0dfe
commit e0116394d4
3 changed files with 73 additions and 60 deletions

View File

@@ -8,7 +8,9 @@
import { urlSearchParams, sourceURL } from "./common/modules/constants.js";
import { isValidHTTPURL, open } from "./common/modules/utilities.js";
const { default: sources } = await import("./common/assets/sources.json", { assert: { type: "json" } });
// import sources from "./common/assets/sources.json" assert { type: "json" }; // Doesn't work in Safari
// const { default: sources } = await import("./common/assets/sources.json", {assert: { type: "json" } }); // Broken on Safari 17.2
import { sources } from "./common/modules/constants.js";
(function main() {
for (const url of sources)