Fix pdfjs lib no-loading in static build. Using classic Service Worker
This commit is contained in:
@ -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',
|
||||
|
||||
Reference in New Issue
Block a user