GithubHelp home page GithubHelp logo

luva-jh / vite-plugin-pwa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vite-pwa/vite-plugin-pwa

0.0 0.0 0.0 1.47 MB

Zero-config PWA for Vite

Home Page: https://vite-plugin-pwa.netlify.app/

License: MIT License

TypeScript 100.00%

vite-plugin-pwa's Introduction

vite-plugin-pwa - Zero-config PWA for Vite
Zero-config PWA Framework-agnostic Plugin for Vite

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, and Svelte
  • โš™๏ธ Stale-while-revalidate: automatic reload when new content is available
  • โœจ Static assets handling: configure static assets for offline support

๐Ÿ“ฆ Install

npm i vite-plugin-pwa -D # yarn add vite-plugin-pwa -D

๐Ÿฆ„ Usage

๐ŸŽฉ From version 0.11.0, workbox has been updated to version 6.2.2 (previous versions were using 6.1.5 version): if you are using advanced configuration like workbox or injectManifest options, you must review the plugin configuration, since this new version of workbox has breaking changes!

Add VitePWA plugin to vite.config.js / vite.config.ts and configure it:

// vite.config.js / vite.config.ts
import { VitePWA } from 'vite-plugin-pwa'

export default {
  plugins: [
    VitePWA()
  ]
}

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 ยฉ 2020-PRESENT Anthony Fu

vite-plugin-pwa's People

Contributors

userquin avatar antfu avatar hannoeru avatar azamat-sharapov avatar buncolak avatar taigabrew avatar dimitris-toulis avatar domsen123 avatar posva avatar f-loat avatar wtchnm avatar v-ed avatar lensanag avatar titieo avatar elmassimo avatar rehhouari avatar schloemicher avatar qgates avatar okxiaoliang4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.