Skip to content
Snippets Groups Projects
ngsw-config.json 814 B
Newer Older
Hugo BAYOUD's avatar
Hugo BAYOUD committed
{
  "$schema": "./node_modules/@angular/service-worker/config/schema.json",
  "index": "/index.html",
  "assetGroups": [
    {
      "name": "app",
      "installMode": "prefetch",
      "resources": {
        "files": [
          "/favicon.ico",
          "/index.html",
          "/manifest.webmanifest",
          "/*.css",
          "/*.js"
        ]
      }
    },
    {
      "name": "assets",
      "installMode": "lazy",
      "updateMode": "prefetch",
      "resources": {
        "files": [
          "/assets/**",
          "/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
        ]
      }
    }
  ],
	"dataGroups": [
		{
			"name": "api",
			"urls": ["https://**"],
			"cacheConfig": {
				"maxSize": 100,
				"maxAge": "1d",
				"timeout": "5s",
				"strategy": "performance"
			}
		}
	]
}