Volver al ranking

vite-pwa/vite-plugin-pwa

TypeScriptvite-pwa-org.netlify.app

Zero-config PWA for Vite

vite-pluginvitepwaworkboxvuesveltesolidjsreactpreact
Crecimiento de estrellas
Estrellas
4.2k
Forks
255
Crecimiento semanal
Issues
165
2k4k
oct 2020sept 2022ago 2024jul 2026
Artefactosnpmnpm install vite-plugin-pwa
README

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

Repositorios relacionados
unocss/unocss

The instant on-demand atomic CSS engine.

TypeScriptnpmOtheratomic-cssvite-plugin
unocss.dev
18.9k977
vikejs/vike

(Replaces Next.js/Nuxt) 🔨 Build mission-critical applications with stability and development freedom.

TypeScriptnpmMIT Licensevitevite-plugin
vike.dev
5.8k395
crxjs/chrome-extension-tools

Build cross-browser extensions with native HMR and zero-config setup

TypeScriptnpmchrome-extensiontypescript
crxjs.dev
4.1k243
unplugin/unplugin-auto-import

Auto import APIs on-demand for Vite, Webpack and Rollup

TypeScriptnpmMIT Licensevite-pluginwebpack-plugin
3.8k217
zh-lx/code-inspector

🚀 Click the dom to open your IDE and position the cursor at dom's source code location! 点击页面 dom 来打开 IDE 并将光标自动定位到源代码位置!

TypeScriptnpmMIT Licensevuevscode
inspector.fe-dev.cn
3k238
lisonge/vite-plugin-monkey

A vite plugin server and build your.user.js for userscript engine like Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat

TypeScriptnpmMIT Licensevitevite-plugin
2k104
antfu-collective/vite-plugin-inspect

Inspect the intermediate state of Vite plugins

TypeScriptnpmMIT Licensevitevite-plugin
1.7k105
webfansplz/vite-plugin-vue-devtools

Vite + Vue DevTools = DX 🔥

TypeScriptnpmMIT Licensedxvue-devtools
1.6k67
qmhc/vite-plugin-dts

A Vite plugin for generating `.d.ts` files.

TypeScriptnpmMIT Licensedtsreact
1.4k93
fi3ework/vite-plugin-checker

💬 Vite plugin that provide checks of TypeScript, ESLint, vue-tsc, Stylelint and more.

TypeScriptnpmMIT Licensetypescriptvite
vite-plugin-checker.netlify.app
1.2k135
ElMassimo/iles

🏝 The joyful site generator

TypeScriptnpmMIT Licenseilesvite-plugin
iles.pages.dev
1.2k36
JonasKruckenberg/imagetools

Load and transform images using a toolbox :toolbox: of custom import directives!

TypeScriptnpmMIT Licenseimagesvite-plugin
1.1k78