fetch pandoc.wasm remotely

This commit is contained in:
patttterson 2026-01-13 15:55:12 -08:00
parent 838a6c7e0b
commit 2bde4dad3e
No known key found for this signature in database
3 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,8 @@ export class PandocConverter extends Converter {
(async () => {
try {
this.status = "downloading";
this.wasm = await fetch("/pandoc.wasm").then((r) =>
// currently fetching from unsafe origin due to CORS, needs to be changed before merge
this.wasm = await fetch("https://newjeans.cafe/pandoc.wasm").then((r) =>
r.arrayBuffer(),
);

Binary file not shown.

View File

@ -1,7 +1,7 @@
const CACHE_NAME = "vert-wasm-cache-v2"; // updated when workers update
const WASM_FILES = [
"/pandoc.wasm",
"https://newjeans.cafe/pandoc.wasm",
"https://cdn.jsdelivr.net/npm/@ffmpeg/core@0.12.10/dist/esm/ffmpeg-core.js",
"https://cdn.jsdelivr.net/npm/@ffmpeg/core@0.12.10/dist/esm/ffmpeg-core.wasm",
];