refactor: centralize CDN config and fix service worker fallback
- Centralize CDN versions/URLs in cdn-version.ts - Switch LibreOffice to @bentopdf/libreoffice-wasm package - Fix service worker fallback to support all WASM packages - Remove dead code and silence production logs
This commit is contained in:
@@ -2,8 +2,9 @@ import { showLoader, hideLoader, showAlert } from '../ui.js';
|
||||
import { downloadFile, readFileAsArrayBuffer, formatBytes, getPDFDocument } from '../utils/helpers.js';
|
||||
import { createIcons, icons } from 'lucide';
|
||||
import { PyMuPDF } from '@bentopdf/pymupdf-wasm';
|
||||
import { getWasmBaseUrl } from '../config/wasm-cdn-config.js';
|
||||
|
||||
const pymupdf = new PyMuPDF(import.meta.env.BASE_URL + 'pymupdf-wasm/');
|
||||
const pymupdf = new PyMuPDF(getWasmBaseUrl('pymupdf'));
|
||||
|
||||
interface LayerData {
|
||||
number: number;
|
||||
|
||||
Reference in New Issue
Block a user