ngsw-config.json 981 Bytes
Newer Older
Lukas Mauß's avatar
Lukas Mauß committed
1 2
{
  "index": "/index.html",
Lukas Mauß's avatar
Lukas Mauß committed
3 4 5 6
  "dataGroups":
  [
    {
      "name": "api",
7
      "urls": ["/api/**"],
Lukas Mauß's avatar
Lukas Mauß committed
8
      "cacheConfig": {
Lukas Mauß's avatar
Lukas Mauß committed
9
        "strategy": "freshness",
Lukas Mauß's avatar
Lukas Mauß committed
10
        "maxSize": 500,
Lukas Mauß's avatar
Lukas Mauß committed
11 12
        "timeout": "3s",
        "maxAge": "7d"
Lukas Mauß's avatar
Lukas Mauß committed
13
      }
14 15
    },
    {
Lukas Mauß's avatar
Lukas Mauß committed
16 17
      "name": "static",
      "urls": [
Lukas Mauß's avatar
Lukas Mauß committed
18
        "!/**/*api*/**"
Lukas Mauß's avatar
Lukas Mauß committed
19
      ],
20 21 22 23 24 25
      "cacheConfig": {
        "strategy": "performance",
        "maxSize": 500,
        "timeout": "3s",
        "maxAge": "30d"
      }
Lukas Mauß's avatar
Lukas Mauß committed
26 27
    }
  ],
Lukas Mauß's avatar
Lukas Mauß committed
28 29 30
  "assetGroups": [
    {
      "name": "app",
31 32
      "installMode": "lazy",
      "updateMode": "lazy",
Lukas Mauß's avatar
Lukas Mauß committed
33 34 35
      "resources": {
        "files": [
          "/favicon.ico",
Lukas Mauß's avatar
Lukas Mauß committed
36
          "/*.html",
37 38
          "/*.scss",
          "/*.ts"
Lukas Mauß's avatar
Lukas Mauß committed
39 40 41
        ],
        "urls": [
          "https://fonts.googleapis.com/**"
Lukas Mauß's avatar
Lukas Mauß committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55
        ]
      }
    }, {
      "name": "assets",
      "installMode": "lazy",
      "updateMode": "prefetch",
      "resources": {
        "files": [
          "/assets/**"
        ]
      }
    }
  ]
}