very basic offline page working

This commit is contained in:
vabene1111
2021-01-21 18:39:24 +01:00
parent 47c690526e
commit 56bcd4f887
3 changed files with 42 additions and 34 deletions

View File

@ -32,6 +32,12 @@ module.exports = {
workboxOptions: {
swSrc: './src/sw.js',
swDest: '../../templates/sw.js',
manifestTransforms: [
originalManifest => {
const result = originalManifest.map(entry => new Object({url: 'static/vue/' + entry.url}))
return {manifest: result, warnings: []};
}
],
}
},
chainWebpack: config => {
@ -47,6 +53,7 @@ module.exports = {
},
});
//TODO somehow remov them as they are also added to the manifest config of the service worker
/*
Object.keys(pages).forEach(page => {
config.plugins.delete(`html-${page}`);