
Zero-config PWA Plugin for Nuxt 3
From v0.4.0,
@vite-pwa/nuxtrequires Vite 5 and Nuxt 3.9.0+.
For older versions,
@vite-pwa/nuxtrequires Vite 3.2.0+ and Nuxt 3.0.0+.
npx nuxi@latest module add @vite-pwa/nuxt
Add @vite-pwa/nuxt module to nuxt.config.ts and configure it:
// nuxt.config.ts
import { defineNuxtConfig } from 'nuxt/config'
export default defineNuxtConfig({
modules: [
'@vite-pwa/nuxt'
],
pwa: {
/* PWA options */
}
})
Read the 📖 documentation for a complete guide on how to configure and use this plugin.
You need to stop the dev server once started and then to see the PWA in action run:
nr dev:preview:build: Nuxt build command + start servernr dev:preview:generate: Nuxt generate command + start server| Example | Source | Playground |
|---|---|---|
Auto Update PWA | GitHub |
|
Check out the type declaration src/types.ts and the following links for more details.
MIT License © 2023-PRESENT Anthony Fu