Zero-config PWA Plugin for VitePress

Overview

@vite-pwa/vitepress - Zero-config PWA for VitePress
Zero-config PWA Plugin for VitePress

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

📦 Install

npm i @vite-pwa/vitepress -D 

# yarn 
yarn add @vite-pwa/vitepress -D

# pnpm 
pnpm add @vite-pwa/vitepress -D

🦄 Usage

You will need wrap your VitePress config with withPwa:

// .vitepress/config.ts
import { defineConfig } from 'vitepress'
import { withPwa } from '@vite-pwa/vitepress'

export default withPwa(defineConfig({
  /* your VitePress options */
  /* Vite PWA Options */
  pwa: {}
}))

Read the 📖 documentation for a complete guide on how to configure and use this plugin.

👀 Full config

Check out the type declaration src/types.ts and the following links for more details.

📄 License

MIT License © 2022-PRESENT Anthony Fu

You might also like...

Zero Two Bot,A fully Modular Whatsapp Bot to do everything possible in WhatsApp by Team Zero Two

Zero Two Bot,A fully Modular Whatsapp Bot to do everything possible in WhatsApp by Team Zero Two

🍭 𝗭𝗲𝗿𝗼 𝗧𝘄𝗼 𝗠𝗗 🍭 A Moduler WhatsApp Bot designed for both PM and Groups - To take your boring WhatsApp usage into a whole different level. T

Dec 25, 2022

Multiplies a number by zero. Useful for when you need to multiply a number by zero

multiply-by-zero Multiplies a number by zero. Useful for when you need to multiply a number by zero Please consider checking out the links of this pro

Jul 3, 2022

Front-end telkom-juara pwa client

TelkomJuara This project was generated with Angular CLI version 12.2.4. Development server Run ng serve for a dev server. Navigate to http://localhost

Dec 31, 2021

simple PWA catalogue with vanilla javascript and json-server as a fake server

simple PWA catalogue with vanilla javascript and json-server as a fake server

simple PWA catalogue with vanilla javascript and json-server as a fake server

Mar 12, 2022

You can control the vibration capability of your device using the Vibration API. (JavaScript) This feature can useful in SPA and PWA.

Vibration Web API You can control the vibration capability of your device using the Vibration API. (JavaScript) This feature can useful in SPA and PWA

Mar 29, 2022

A lightweight, standalone package to integrate full PWA features into Remix 💿

A lightweight, standalone package to integrate full PWA features into Remix 💿

Remix PWA PWA integration & support for Remix Remix PWA is a lightweight, standalone npm package that adds full Progressive Web App support to Remix ?

Jan 3, 2023

A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

 A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

A framework dedicated to making it easier for you to build enterprise-grade PWA applications.

Oct 6, 2022

A fully configurable & customizable Remix PWA stack.

A fully configurable & customizable Remix PWA stack.

Remix RockSpec Stack Learn more about Remix Stacks. npx create-remix --template ShafSpecs/rockspec-stack What's in the stack Fly app deployment with

Dec 18, 2022
Comments
  • check mpa

    check mpa

    not working in pwa-prompt example, there is no client build!

    EDIT: we should check if adding a custom plugin removing the ssr check (on pwa build plugin) works (it should work: we're getting the api reference using mpa flag)

    opened by userquin 2
  • Pending

    Pending

    We need:

    • modify injectRegister to be 'virtual' | 'script' | 'inline': defaults to script?
    • inject webmanifest in VitePress head: we need to handle dev or build mode
    • inject registerSW.js or inline code to register the sw when injectRegister !== 'virtual' (if using virtual, just ignore it)
    • add example with prompt: requires SFC (quite simple)
    enhancement 
    opened by userquin 2
  • change image title

    change image title

    the hero image should be for VitePress, like the title: Zero-config PWA Plugin for VitePress

    @antfu do you like that change? If so, can you change/provide the hero image?

    opened by userquin 1
Releases(v0.0.3)
Owner
Vite PWA
PWA integrations for Vite and the ecosystem
Vite PWA
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Generate the VitePress sidebar through the folder structure

⚡ VitePress Plugin: Auto Sidebar Generate the VitePress sidebar through the folder structure. ✨ Release Notes Features Small library TypeScript Suppor

Jonathan Schneider 8 Dec 28, 2022
Nuxt.js 3 x Histoire x Vitest x VitePress x Turbo (pnpm)

Turborepo nuxt starter This is a monorepo with Nuxt, Histoire, Vitest & VitePress as a starter for any project that can be easily extended. You can al

Gurvan 19 Dec 19, 2022
Vite plugin to client bundle i18next locales composited from one to many json/yaml files from one to many libraries. Zero config HMR support included.

vite-plugin-i18next-loader yarn add -D vite-plugin-i18next-loader Vite plugin to client bundle i18next locales composited from one to many json/yaml f

AlienFast 4 Nov 30, 2022
A new zero-config test runner for the true minimalists

Why User-friendly - zero-config, no API to learn, simple conventions Extremely lighweight - only 40 lines of code and no dependencies Super fast - wit

null 680 Dec 20, 2022
📦 🍣 Zero-config JS bundler for ESM, CommonJS, and .d.ts outputs

pkgroll Write your code in ESM & TypeScript and bundle it to get ESM, CommonJS, and type declaration outputs with a single command! Features Zero conf

hiroki osame 153 Dec 23, 2022
📦 🍣 Zero-config JS bundler for ESM, CommonJS, and .d.ts outputs. (Forked from pkgroll)

?? ?? puild (A fork of pkgroll) Write your code in ESM & TypeScript and bundle it to get ESM, CommonJS, and type declaration outputs with a single com

ʀᴀʏ 6 Sep 6, 2022
Forked from hayes0724/shopify-packer Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, compatible with Slate and existing websites.

Shopify Packer Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, comes with starter themes and com

Web & Mobile | eCommerce | Full-Stack Developer 4 Nov 24, 2022