webpack: don't precache .DS_Store in sw.js (#64)
This commit is contained in:
parent
f3cb9ae3f9
commit
a779976038
1 changed files with 7 additions and 2 deletions
|
|
@ -47,7 +47,12 @@ module.exports = [{
|
||||||
'process.env.NODE_ENV': 'development',
|
'process.env.NODE_ENV': 'development',
|
||||||
}),
|
}),
|
||||||
...(process.env.NODE_ENV === 'production' ? [
|
...(process.env.NODE_ENV === 'production' ? [
|
||||||
new WorkboxPlugin.GenerateSW({
|
new WorkboxPlugin.GenerateSW({
|
||||||
|
exclude: [
|
||||||
|
/\.map$/,
|
||||||
|
/^manifest.*\.js$/,
|
||||||
|
/.*?\.DS_Store$/,
|
||||||
|
],
|
||||||
// these options encourage the ServiceWorkers to get in there fast
|
// these options encourage the ServiceWorkers to get in there fast
|
||||||
// and not allow any straggling "old" SWs to hang around
|
// and not allow any straggling "old" SWs to hang around
|
||||||
swDest: path.join(__dirname, "dist", 'sw.js'),
|
swDest: path.join(__dirname, "dist", 'sw.js'),
|
||||||
|
|
@ -103,4 +108,4 @@ module.exports = [{
|
||||||
filename: 'sw.js',
|
filename: 'sw.js',
|
||||||
path: path.resolve(__dirname, 'dist'),
|
path: path.resolve(__dirname, 'dist'),
|
||||||
},
|
},
|
||||||
}*/];
|
}*/];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue