Исправление багов
This commit is contained in:
@@ -58,7 +58,7 @@ module.exports = merge(baseWpConfig, {
|
|||||||
new SWPrecacheWebpackPlugin({
|
new SWPrecacheWebpackPlugin({
|
||||||
cacheId: 'liberama',
|
cacheId: 'liberama',
|
||||||
dontCacheBustUrlsMatching: /\.\w{8}\./,
|
dontCacheBustUrlsMatching: /\.\w{8}\./,
|
||||||
filename: 'service-worker.js',
|
filepath: `${publicDir}/service-worker.js`,
|
||||||
minify: true,
|
minify: true,
|
||||||
navigateFallback: '/index.html',
|
navigateFallback: '/index.html',
|
||||||
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
|
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
if('serviceWorker' in navigator) {
|
if('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.register('/app/service-worker.js');
|
navigator.serviceWorker.register('/service-worker.js');
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user