Routify 3 public BETA is here! Check it out

PWA & Offline avaibility

To enable offline availability, you can turn your SPA into a PWA (Progressive Web App). First, import src/Serviceworker.svelte from any file. Then, add the <Serviceworker/> component.

Example:

    <!-- src/App.svelte -->
    <script>
      ...
      import Serviceworker from './Serviceworker.svelte';
      ...
    </script>
    ...
    <Serviceworker/>

Note: For now, PWA works in production build, so you can run “npm run build”, and subsequently “npm run serve” to test out your PWA. It is Google Chrome’s lighthouse compatible.

These guides are work-in-progress and we stand by on Github and Discord - ready to help. All feedback we receive will help us improve the documentation.

Writing good documentation that is up-to-date is difficult. If you notice a mistake, help us out.