fixed serviceworker with workbox
This commit is contained in:
parent
2a238d79f9
commit
2c2cf76a0e
6 changed files with 503 additions and 61 deletions
|
@ -2,6 +2,7 @@ const path = require('path');
|
|||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const packageConfig = require('./package.json');
|
||||
const WorkboxPlugin = require('workbox-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, 'src'),
|
||||
|
@ -32,6 +33,10 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
]
|
||||
}),
|
||||
new WorkboxPlugin.InjectManifest({
|
||||
swSrc: path.resolve(__dirname, 'src/serviceworker.js'),
|
||||
swDest: 'serviceworker.js'
|
||||
})
|
||||
],
|
||||
output: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue