MyGit

vite-pwa/vite-plugin-pwa

Fork: 190 Star: 2817 (更新于 2024-05-25 02:19:23)

license: MIT

Language: TypeScript .

Zero-config PWA for Vite

最后发布版本: v0.20.0 ( 2024-04-30 18:14:31)

官方网址 GitHub网址

vite-plugin-pwa - Zero-config PWA for Vite
Zero-config PWA Framework-agnostic Plugin for Vite

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
  • 🛠️ 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-05-25 02:19:08)

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

2024-03-15 21:44:42 v0.19.4

2024-03-14 20:00:10 v0.19.3

2024-02-29 19:37:28 v0.19.2

2024-02-28 21:42:57 v0.19.1

2024-02-17 21:38:06 v0.19.0

主题(topics):

preact, pwa, react, solidjs, svelte, vite, vite-plugin, vue, workbox

vite-pwa/vite-plugin-pwa同语言 TypeScript最近更新仓库

2024-07-03 11:29:30 immich-app/immich

2024-06-27 00:44:20 langfuse/langfuse

2024-06-25 21:34:23 ZuodaoTech/everyone-can-use-english

2024-06-25 02:22:22 typescript-eslint/typescript-eslint

2024-06-25 01:34:15 lobehub/lobe-chat

2024-06-21 17:44:25 janhq/jan