diff --git a/frontend/vendor/libweblabel.mjs b/frontend/public/vendor/libweblabel.js similarity index 100% rename from frontend/vendor/libweblabel.mjs rename to frontend/public/vendor/libweblabel.js diff --git a/frontend/vendor/libweblabel.wasm b/frontend/public/vendor/libweblabel.wasm similarity index 100% rename from frontend/vendor/libweblabel.wasm rename to frontend/public/vendor/libweblabel.wasm diff --git a/frontend/src/views/Print.vue b/frontend/src/views/Print.vue index 1b4724f..28d0908 100644 --- a/frontend/src/views/Print.vue +++ b/frontend/src/views/Print.vue @@ -98,9 +98,13 @@ import {markRaw, nextTick} from "vue"; import QRCode from "qrcode"; import BaseLayout from "@/components/BaseLayout.vue"; -import {MultiPrinterBlob, canvasToBitmap, bitmapToCanvas} from "../../vendor/weblabel.mjs"; +import {MultiPrinterBlob, canvasToBitmap, bitmapToCanvas} from "../../vendor/weblabel.js"; -const BLOB_URL = new URL("../../vendor/libweblabel.mjs", import.meta.url).href; +// Served verbatim from public/vendor/ rather than bundled: libweblabel.js's +// own emscripten glue resolves its .wasm sibling relative to *its own* +// import.meta.url at runtime, so both files need to keep sitting together, +// unhashed, at a stable URL - not a Vite-fingerprinted asset path. +const BLOB_URL = "/vendor/libweblabel.js"; const MAX_ZOOM = 4; /* never magnify the preview more than this */ const TRAILING_PADDING_PX = 3; /* blank columns after the cut, same idea as the leading margin */ diff --git a/frontend/vendor/weblabel.mjs b/frontend/vendor/weblabel.js similarity index 100% rename from frontend/vendor/weblabel.mjs rename to frontend/vendor/weblabel.js