@atomico/rollup-plugin-workbox

Allows the execution of the workbox once the bundle is created.

Usage no npm install needed!

<script type="module">
  import atomicoRollupPluginWorkbox from 'https://cdn.skypack.dev/@atomico/rollup-plugin-workbox';
</script>

README

@atomico/rollup-plugin-workbox

Allows the execution of the workbox once the bundle is created.

import workbox from "@atomicojs/rollup-plugin-workbox";

export default {
    input: /*...*/,
    output: /*...*/,
    plugins: [
        workbox({
            globDirectory: "dist/",
            globPatterns: ["**/*.{html,json,js,css}"],
            swDest: "dist/sw.js"
        })
    ]
};

To complete the workbox configuration you can see the following source