razzle-plugin-serviceworker

    1.0.3 • Public • Published

    razzle-plugin-serviceworker

    Build Status Coverage Status npm dependencies Status devDependencies Status

    A serviceworker for Razzle using offline-plugin.

    Installation

    Node.js

    $ npm install razzle-plugin-serviceworker --save-dev
    $ npm install offline-plugin --save
    

    Configuration

    Edit or create razzle.config.js in your project root.

    // razzle.config.js
    module.exports = {
      plugins: ['serviceworker'],
    };
    

    Add serviceWorker to client

    Add to src/client.js

    import * as OfflinePluginRuntime from "offline-plugin/runtime";
    OfflinePluginRuntime.install();
    

    Adding server side webpack plugin options

    // razzle.config.js
    module.exports = {
      plugins: [{
          name:'serviceworker',
          options: {
              autoUpdate: true
          }
      }],
    };
    

    License

    ISC

    Install

    npm i razzle-plugin-serviceworker

    DownloadsWeekly Downloads

    98

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    4.58 kB

    Total Files

    5

    Last publish

    Collaborators

    • gnarr