1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Workbox -> GlobIgnore doesn't work as intended

Discussão em 'Angular' iniciado por xXxKaddiexXx, Novembro 5, 2024 às 10:12.

  1. xXxKaddiexXx

    xXxKaddiexXx Guest

    I have the following workbox-config.js:

    module.exports = {
    globDirectory: "dist/",
    globPatterns: ["**/*.{css,eot,html,ico,jpg,js,json,png,svg,ttf,txt,webmanifest,webm,xml}"],
    globIgnores: [
    '**/*.woff',
    '**/*.woff2',
    '**/assets/fonts/**/*',
    '**/assets/scripts/**/*'
    ],
    dontCacheBustURLsMatching: new RegExp(".+.[a-f0-9]{20}..+"),
    maximumFileSizeToCacheInBytes: 4 * 1024 * 1024, // 4Mb
    swSrc: "src/assets/scripts/c2oWorkerSrc.js",
    swDest: "dist/c2oWorker.js",
    };


    but it always precaches the .woff and .woff2 files, no matter, what I write in globIgnore. What do I do wrong?

    Continue reading...

Compartilhe esta Página