Fix pdfjs lib no-loading in static build. Using classic Service Worker

This commit is contained in:
2026-09-12 12:07:28 +03:00
parent c84e55488c
commit 78d4fc68cb
8 changed files with 310 additions and 16 deletions

View File

@ -5,9 +5,24 @@ import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
plugins: [
svelte(),
svelte({
onwarn(warning, handler) {
if (
warning.code.startsWith('a11y_') ||
warning.code === 'slot_element_deprecated' ||
warning.code === 'svelte_self_deprecated' ||
warning.code === 'non_reactive_update'
) {
return;
}
handler(warning);
}
}),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,wasm}']
},
manifest: {
name: 'UnitPrint',
short_name: 'UnitPrint',