Manual registrations for worker
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<script lang="ts">
|
||||
import '../app.postcss';
|
||||
import { base } from '$app/paths';
|
||||
import { onMount } from 'svelte';
|
||||
// This can be removed once https://github.com/sveltejs/kit/issues/1612 is fixed.
|
||||
// Then move it into src and vite will bundle it automatically.
|
||||
onMount(() => {
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register(`${base}/service-worker.js`);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<main class="h-screen">
|
||||
|
||||
@@ -21,7 +21,8 @@ export const get = (): { body: unknown } => {
|
||||
display: 'standalone',
|
||||
scope: `${base}`,
|
||||
theme_color: '#6366F1',
|
||||
description: 'Description'
|
||||
description: 'FlowChart & Diagrams Editor.',
|
||||
orientation: 'landscape'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user