|
2 周之前 | |
---|---|---|
.. | ||
dist | 2 周之前 | |
node_modules | 2 周之前 | |
LICENSE | 2 周之前 | |
README.md | 2 周之前 | |
client.d.ts | 2 周之前 | |
index.d.ts | 2 周之前 | |
info.d.ts | 2 周之前 | |
package.json | 2 周之前 |
Zero-config PWA Framework-agnostic Plugin for Vite
From v0.13,
vite-plugin-pwa
requires Vite 3.1 or above.
npm i vite-plugin-pwa -D
# yarn
yarn add vite-plugin-pwa -D
# pnpm
pnpm add vite-plugin-pwa -D
Add VitePWA
plugin to vite.config.js / vite.config.ts
and configure it:
// vite.config.js / vite.config.ts
import { VitePWA } from 'vite-plugin-pwa'
export default {
plugins: [
VitePWA()
]
}
Read the 📖 documentation for a complete guide on how to configure and use this plugin.
Check out the client type declarations client.d.ts for built-in frameworks support.
Check out the type declaration src/types.ts and the following links for more details.
MIT License © 2020-PRESENT Anthony Fu