More fun with Parcel

Resources

Service Worker
1
2
3
4
5
6
7
8
9
10
11
const workboxBuild = require('workbox-build');

workboxBuild.generateSW({
globDirectory: './dist/',
globPatterns: ['**\/*.{html,js,css,png,jpg,svg,json}'],
swDest: './dist/sw.js',
dontCacheBustUrlsMatching: /\w{32}\./
})
.then(() => {
console.log('Service worker generated.');
});