HomeLogo

@mr-hope/vuepress-plugin-pwa

A powerfull PWA plugin

Guide 💡 Config 🛠

This plugin will turn on Progressive Web App Support.

# How to use

# Install

npm i -D @mr-hope/vuepress-plugin-pwa
1

Or

yarn add -D @mr-hope/vuepress-plugin-pwa
1

# Usage

const { head } = require("@mr-hope/vuepress-plugin-pwa");

const pwaOptions = {
  // your options
};

// .vuepress/config.js
module.exports = {
  head: head(pwaOptions, [
    /*
     * your original head
     * omit this param if you don’t have any config
     */
  ]),
  plugins: [["@mr-hope/pwa", pwaOptions]],
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Tips

You should use head function because plugins cannot insert head tags to the output HTML.

The function will inject some PWA related tags to the <head> tag part of output site HTML files.