Skip to content

Instantly share code, notes, and snippets.

@DaveHudson
Created February 26, 2018 19:12
Show Gist options
  • Save DaveHudson/dacc142f3ca42d29aea87d7caf766092 to your computer and use it in GitHub Desktop.
Save DaveHudson/dacc142f3ca42d29aea87d7caf766092 to your computer and use it in GitHub Desktop.
preact.config.js
const WorkboxPlugin = require('workbox-webpack-plugin');
export default config => {
config.plugins.push(
new WorkboxPlugin.InjectManifest({
swSrc: './service-worker.js',
swDest: './service-worker.js',
include: [/\.html$/, /\.js$/, /\.svg$/, /\.css$/, /\.png$/, /\.ico$/]
})
);
return config;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment