elm-pages-v3-beta/examples/docs/workbox-config.js

21 lines
493 B
JavaScript
Raw Normal View History

2019-08-09 07:26:59 +03:00
module.exports = {
globDirectory: "dist/",
globPatterns: ["**/*.{html,js}"],
swDest: "dist/service-worker.js",
2019-08-09 07:26:59 +03:00
runtimeCaching: [
{
// Match any request that ends with .png, .jpg, .jpeg or .svg.
// urlPattern: /^https:\/\/fonts\.googleapis\.com/,
urlPattern: /^https:\/\/fonts\.gstatic\.com/,
// Apply a cache-first strategy.
handler: "CacheFirst",
options: {
// Use a custom cache name.
cacheName: "fonts"
}
}
]
};