Skip to content

vite-pwa/create-pwa

Repository files navigation

@vite-pwa/create-pwa - PWA Templates
PWA Templates

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

🦄 Usage

Since the package name begins with create-, it is considered a project generator and can be run simply as @vite-pwa/pwa.

This command launches an interactive questionnaire in the command line for configuring different parts of the project.

# npm
npm create @vite-pwa/pwa@latest

# yarn
yarn create @vite-pwa/pwa

# pnpm
pnpm create @vite-pwa/pwa

# bun
bun create @vite-pwa/pwa

Then follow the prompts!

Read the 📖 documentation for a complete guide on how to use it.

🕐 Status

Our plan is to release the first version when all Vite templates are ready:

  • VanillaJS and TypeScript templates
  • Vue and Vue + TypeScript templates
  • Lit and Lit + TypeScript templates
  • Svelte and Svelte + TypeScript templates
  • React and React + TypeScript templates
  • Preact and Preact + TypeScript templates
  • SolidJS and SolidJS + TypeScript templates

Later we will add support for meta-frameworks:

  • Nuxt 3 template (from v0.1.0)
  • SvelteKit template (from v0.2.0)
  • Astro template
  • Remix template (from v0.3.0)
  • VitePress template
  • Qwik City template

You can check the progress in the TODO file, previous task lists will be also updated.

If you want to contribute, read the CONTRIBUTING guide.

📄 License

MIT License © 2024-PRESENT Anthony Fu