Skip to content

vite-pwa/sveltekit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

081dd3b Β· Dec 30, 2022

History

40 Commits
Dec 24, 2022
Dec 24, 2022
Sep 15, 2022
Sep 7, 2022
Sep 7, 2022
Sep 10, 2022
Sep 7, 2022
Sep 21, 2022
Dec 24, 2022
Sep 15, 2022
Sep 30, 2022
Dec 30, 2022
Dec 24, 2022
Sep 7, 2022
Sep 21, 2022

Repository files navigation

@vite-pwa/sveltekit - Zero-config PWA for SvelteKit
Zero-config PWA Plugin for SvelteKit

NPM version NPM Downloads Docs & Guides
GitHub stars


πŸš€ Features

  • πŸ“– Documentation & guides
  • πŸ‘Œ Zero-Config: sensible built-in default configs for common use cases
  • πŸ”© Extensible: expose the full ability to customize the behavior of the plugin
  • 🦾 Type Strong: written in TypeScript
  • πŸ”Œ Offline Support: generate service worker with offline support (via Workbox)
  • ⚑ Fully tree shakable: auto inject Web App Manifest
  • πŸ’¬ Prompt for new content: built-in support for Vanilla JavaScript, Vue 3, React, Svelte, SolidJS and Preact
  • βš™οΈ Stale-while-revalidate: automatic reload when new content is available
  • ✨ Static assets handling: configure static assets for offline support
  • 🐞 Development Support: debug your custom service worker logic as you develop your application

πŸ“¦ Install

npm i @vite-pwa/sveltekit -D 

# yarn 
yarn add @vite-pwa/sveltekit -D

# pnpm 
pnpm add @vite-pwa/sveltekit -D

πŸ¦„ Usage

Add SvelteKitPWA plugin to vite.config.js / vite.config.ts and configure it:

// vite.config.js / vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite'
import { SvelteKitPWA } from '@vite-pwa/sveltekit'

export default {
  plugins: [
    sveltekit(),
    SvelteKitPWA()
  ]
}

Read the πŸ“– documentation for a complete guide on how to configure and use this plugin.

πŸ‘€ Full config

Check out the type declaration src/types.ts and the following links for more details.

πŸ“„ License

MIT License Β© 2022-PRESENT Anthony Fu