All Projects â†’ antfu â†’ Vite Plugin Pwa

antfu / Vite Plugin Pwa

Licence: mit
Zero-config PWA for Vite

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Vite Plugin Pwa

hyperapp-todo-parcel
marcusasplund.github.io/hyperapp-todo-parcel/
Stars: ✭ 12 (-94.26%)
Mutual labels:  pwa, workbox
Next Pwa
Zero config PWA plugin for Next.js, with workbox 🧰
Stars: ✭ 909 (+334.93%)
Mutual labels:  pwa, workbox
jekyll-pwa
Jekyll plugin for PWA
Stars: ✭ 95 (-54.55%)
Mutual labels:  pwa, workbox
workbox-in-js-framework
đŸŗ Code sample for using Workbox in various JS framework
Stars: ✭ 16 (-92.34%)
Mutual labels:  pwa, workbox
Starter React Flux
Generate your React PWA project with TypeScript or JavaScript
Stars: ✭ 65 (-68.9%)
Mutual labels:  pwa, workbox
jekyll-pwa-workbox
A Jekyll plugin using Workbox to make your PWA / Website available offline.
Stars: ✭ 22 (-89.47%)
Mutual labels:  pwa, workbox
building-pwas-with-angular
Building Progressive Web Apps with Angular - Devconf 2018
Stars: ✭ 13 (-93.78%)
Mutual labels:  pwa, workbox
React Pwa Webpack Starter
Boilerplate to build a React PWA with Webpack + Workbox
Stars: ✭ 38 (-81.82%)
Mutual labels:  pwa, workbox
Pwa Module
Zero config PWA solution for Nuxt.js
Stars: ✭ 1,033 (+394.26%)
Mutual labels:  pwa, workbox
Elm Hn Pwa
Hacker News as a PWA built with Elm
Stars: ✭ 43 (-79.43%)
Mutual labels:  pwa, workbox
Pwafire
Progressive Web Apps API of APIs
Stars: ✭ 137 (-34.45%)
Mutual labels:  pwa, workbox
Next Offline
make your Next.js application work offline using service workers via Google's workbox
Stars: ✭ 1,306 (+524.88%)
Mutual labels:  pwa, workbox
Pwatter
Angular Progressive Web App using Workbox
Stars: ✭ 167 (-20.1%)
Mutual labels:  pwa, workbox
Gatsby Starter Morning Dew
🚀 A Gatsby theme/starter to build lightning-fast blog/websites
Stars: ✭ 186 (-11%)
Mutual labels:  pwa
Ui
🏁🌐 Frontend Svelte PWA starter for SaaS startups
Stars: ✭ 200 (-4.31%)
Mutual labels:  pwa
Polymer Skeleton
💀 Skeleton for Polymer 3 app with Webpack, PostCSS and Service Workers ready.
Stars: ✭ 185 (-11.48%)
Mutual labels:  workbox
Jekyll Webpack Boilerplate
⚡ī¸ A boilerplate with Jekyll and Webpack to make the most performant static websites
Stars: ✭ 182 (-12.92%)
Mutual labels:  pwa
Sample Pie Shop
Example e-commerce site to explore PWA (Progressive Web App) use cases.
Stars: ✭ 206 (-1.44%)
Mutual labels:  pwa
Lighthousebot
Run Lighthouse in CI, as a web service, using Docker. Pass/Fail GH pull requests.
Stars: ✭ 2,251 (+977.03%)
Mutual labels:  pwa
Shopware Pwa
Shopware PWA for eCommerce. Headless storefront solution for Shopware 6, which communicates through the SalesChannel-API. Always Open Source, MIT license. Made with 💙 by shopware AG & Vue Storefront.
Stars: ✭ 180 (-13.88%)
Mutual labels:  pwa

vite-plugin-pwa - Zero-config PWA for Vite


Features

  • Generate Service Worker with Offline support (via Workbox)
  • Auto inject Web App Manifest
  • WIP: Strategies option
  • WIP: Meta injection
  • WIP: Icons generation for different dimensions

Usage

ℹī¸ Vite 2 is supported from v0.3.x, Vite 1's support is discontinued.

npm i vite-plugin-pwa -D # yarn add vite-plugin-pwa -D

Add it to vite.config.js

// vite.config.js
import { VitePWA } from 'vite-plugin-pwa'

export default {
  plugins: [
    VitePWA()
  ]
}

Configuration

Simple (generateSW)

VitePWA({
  manifest: {
    // content of manifest
  },
  workbox: {
    // workbox options for generateSW
  }
})

WIP: Advanced (injectManifest)

// sw.js
import { precacheAndRoute } from 'workbox-precaching'
// self.__WB_MANIFEST is default injection point
precacheAndRoute(self.__WB_MANIFEST)
// vite.config.js
VitePWA({
  strategies: 'injectManifest',
  manifest: {
    // content of manifest
  },
  injectManifest: {
    // workbox options for injectManifest
  }
})

Full config

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

Sponsors

This project is part of my Sponsor Program

License

MIT License Š 2020 Anthony Fu

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].