feat(#6): Add PWA functionality and service worker

This commit is contained in:
Josh Creek
2022-10-08 00:41:44 +01:00
parent c173215b29
commit 4ba77a358a
10 changed files with 4825 additions and 744 deletions
+19
View File
@@ -0,0 +1,19 @@
const merge = require('webpack-merge');
const { InjectManifest } = require('workbox-webpack-plugin');
const common = require('./webpack.common');
common.plugins.push(new InjectManifest({
swSrc: './src/serviceWorker.js',
swDest: 'service-worker.js',
maximumFileSizeToCacheInBytes: 50000000,
}));
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000,
},
});