0.1.0 • Published 3 years ago

create-vite-pwa v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Create Vite PWA

Compatibility Note: Vite, and this module, require Node.js version >=12.0.0.

This is an enhancement to the create Vite package (npm init vite@latest) that enhances any of the available Vite starters to make them work as a PWA through Vite Plugin PWA and Workbox. Out of the box, you get the following:

  • The Vite starter of your choice
  • Vite Plugin PWA configured with a basic Web App Manifest
  • Service Worker registration through Vite Plugin PWA
  • Sample icons to use
  • A Service Worker with a basic offline fallback provided by Workbox Recipes

Usage

Run npm init vite-pwa [PROJECT-DIR].

You can pass the following flags in to set options instead of going through the prompts:

FlagDescription
-f FRAMEWORKFramework to use
{--ts \| --js}Whether to use TypeScript or JavaScript
--overwriteIf a project directory is included, overwrite its content if it's not empty