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:
11
src/js/const/cdn-version.ts
Normal file
11
src/js/const/cdn-version.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const PACKAGE_VERSIONS = {
|
||||
libreoffice: '2.3.1',
|
||||
ghostscript: '0.1.0',
|
||||
pymupdf: '0.1.9',
|
||||
} as const;
|
||||
|
||||
export const CDN_URLS = {
|
||||
libreoffice: `https://cdn.jsdelivr.net/npm/@bentopdf/libreoffice-wasm@${PACKAGE_VERSIONS.libreoffice}/assets/`,
|
||||
ghostscript: `https://cdn.jsdelivr.net/npm/@bentopdf/gs-wasm@${PACKAGE_VERSIONS.ghostscript}/assets/`,
|
||||
pymupdf: `https://cdn.jsdelivr.net/npm/@bentopdf/pymupdf-wasm@${PACKAGE_VERSIONS.pymupdf}/assets/`,
|
||||
} as const;
|
||||
Reference in New Issue
Block a user