Package Exports
- vite-plugin-pwa
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vite-plugin-pwa) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Features
- Generate Service Worker with Offline support (via Workbox)
- Auto inject Web App Manifest
- WIP: Strategies options
- WIP: Meta injection
- WIP: Icons generation for different dimensions
Usage
This plugin requires Vite
>= v1.0.0-rc.8
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
VitePWA({
manifest: {
// content of manifest
},
workbox: {
// workbox options
}
})
Check out the type declaration src/index.ts and the following links for more details.
Sponsors
This project is part of my Sponsor Program
License
MIT License © 2020 Anthony Fu