Scaffolding Your First Vite PWA Project
TIP
From version v0.6.0
, all the templates to use Vite 6, including also the latest frameworks changes.
Use version v0.5.0
for Vite 5 and previous versions of the frameworks.
Compatibility Note
Vite requires Node.js version 18.x.x or 20+. However, some templates may require a higher Node.js version to work, please upgrade Node if your package manager warns about it.
$ pnpm create @vite-pwa/pwa
$ yarn create @vite-pwa/pwa
$ npm create @vite-pwa/pwa@latest
$ bun create @vite-pwa/pwa
Then follow the prompts!
You can also directly specify the project name and the template you want to use via additional command line options. For example, to scaffold a Vite PWA + Vue project, run:
$ pnpm create @vite-pwa/pwa my-vue-app --template vue
$ yarn create @vite-pwa/pwa my-vue-app --template vue
$ npm create @vite-pwa/pwa@latest my-vue-app -- --template vue
$ bun create @vite-pwa/pwa my-vue-app --template vue
See create-pwa for more details on each supported template: vanilla
, vanilla-ts
, vue
, vue-ts
, react
, react-ts
, preact
, preact-ts
, lit
, lit-ts
, svelte
, svelte-ts
, solid
, solid-ts
(templates can be found inside the templates
folder).