Ctrl K
ComunidadGuías…

ngsw-config.json

Rama master · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
{
  "$schema": "./node_modules/@angular/service-worker/config/schema.json",
  "index": "/index.html",
  "assetGroups": [
    {
      "name": "app",
      "installMode": "prefetch",
      "resources": {
        "files": ["/favicon.ico", "/index.html", "/manifest.json", "/*.css", "/*.js"]
      }
    },
    {
      "name": "criticalAssets",
      "installMode": "prefetch",
      "updateMode": "prefetch",
      "resources": {
        "files": [
          "/assets/icons/*.svg",
          "/assets/icons/icon-*.png",
          "/assets/icons/favicon-*.png",
          "/assets/i18n/en.json",
          "/media/material-symbols-outlined-*.woff2",
          "/*.(otf|ttf|woff|woff2)"
        ]
      }
    },
    {
      "name": "assets",
      "installMode": "lazy",
      "updateMode": "prefetch",
      "resources": {
        "files": ["/assets/**", "/media/**"]
      }
    },
    {
      "name": "externalAssets",
      "installMode": "lazy",
      "updateMode": "prefetch",
      "resources": {
        "urls": ["**/*.(png|jpg|jpeg|gif)"]
      }
    }
  ],
  "dataGroups": [
    {
      "name": "api-freshness",
      "urls": [
        "https://api.github.com/**",
        "https://gitlab.com/api/**",
        "https://*.atlassian.net/**"
      ],
      "cacheConfig": {
        "strategy": "freshness",
        "maxSize": 10,
        "maxAge": "1h",
        "timeout": "10s"
      }
    }
  ]
}