vite-pwa/vite-plugin-pwa
Fork: 209 Star: 3204 (更新于 2024-11-10 20:37:00)
license: MIT
Language: TypeScript .
Zero-config PWA for Vite
最后发布版本: v0.20.5 ( 2024-09-05 02:57:46)
Zero-config PWA Framework-agnostic Plugin for Vite
🚀 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
- 🛠️ Versatile: integration with meta frameworks: îles, SvelteKit, VitePress, Astro, Nuxt 3 and Remix
- 💥 PWA Assets Generator: generate all the PWA assets from a single command and a single source image
- 🚀 PWA Assets Integration: serving, generating and injecting PWA Assets on the fly in your application
📦 Install
From v0.17,
vite-plugin-pwa
requires Vite 5.
From v0.16
vite-plugin-pwa
requires Node 16 or above:workbox v7
requires Node 16 or above.
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
🦄 Usage
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.
👀 Full config
Check out the type declaration src/types.ts and the following links for more details.
📄 License
MIT License © 2020-PRESENT Anthony Fu
最近版本更新:(数据更新于 2024-10-20 06:05:53)
2024-09-05 02:57:46 v0.20.5
2024-09-04 21:58:53 v0.20.4
2024-09-03 07:03:21 v0.20.3
2024-08-30 00:07:12 v0.20.2
2024-07-25 17:52:44 v0.20.1
2024-04-30 18:14:31 v0.20.0
2024-04-06 00:41:29 v0.19.8
2024-03-23 06:56:54 v0.19.7
2024-03-22 03:20:27 v0.19.6
2024-03-19 19:36:01 v0.19.5
主题(topics):
preact, pwa, react, solidjs, svelte, vite, vite-plugin, vue, workbox
vite-pwa/vite-plugin-pwa同语言 TypeScript最近更新仓库
2024-11-24 06:05:47 RSSNext/Follow
2024-11-23 21:18:28 MetaCubeX/metacubexd
2024-11-23 12:44:19 clash-verge-rev/clash-verge-rev
2024-11-23 10:05:04 continuedev/continue
2024-11-23 02:27:31 microsoft/TypeScript
2024-11-23 00:25:37 siyuan-note/siyuan