Skip to content

Commit

Permalink
v0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeedwin committed Dec 11, 2020
1 parent b94d2fa commit fdf04db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion snippets/javascript.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
" clientsClaim,",
" cacheNames,",
" setCacheNameDetails,",
" setCatchHandler",
" setCatchHandler,",
" NavigationRoute,",
" registerRoute,",
" preCaching,",
Expand Down
25 changes: 0 additions & 25 deletions tests/service-worker.js
Original file line number Diff line number Diff line change
@@ -1,25 +0,0 @@
import { registerRoute } from 'workbox-routing';
import { CacheFirst } from 'workbox-strategies';
import { Plugin as ExpirationPlugin } from 'workbox-expiration';
import { CacheableResponsePlugin } from 'workbox-cacheable-response';
import * as googleAnalytics from 'workbox-google-analytics';

workbox.setConfig({
debug:true
});

registerRoute(
// cache all images in './images/' directory
new RegExp('/images/'),
// use cache-first workbox strategy
new CacheFirst({
cacheName: 'image-cache',
plugins: [
new ExpirationPlugin({
maxEntries: 20,
}),
],
})
);

googleAnalytics.initialize();

0 comments on commit fdf04db

Please sign in to comment.