Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning - One of the glob patterns doesnt match any files. #169

Open
crunchwrap89 opened this issue Oct 22, 2024 · 1 comment
Open

Warning - One of the glob patterns doesnt match any files. #169

crunchwrap89 opened this issue Oct 22, 2024 · 1 comment

Comments

@crunchwrap89
Copy link

crunchwrap89 commented Oct 22, 2024

I get a warning message when building my project:

warnings: 
One of the glob patterns doesn't match any files. Please remove or fix the following: {
  "globDirectory": "/Users/elmaco/WebstormProjects/GeoQuestr/.output/public",
  "globPattern": "**/_payload.json",
  "globIgnores": [
    "**/node_modules/**/*",
    "sw.js",
    "workbox-*.js"
  ]
}

Even if my globPatterns array is empty.

How can it be? I dont understand how to fix this issue.

pwa: {
...
    registerType: 'prompt',
    workbox: {
      maximumFileSizeToCacheInBytes: 50 * 1024 * 1024, // 50MB
      globPatterns: [],
      navigateFallback: null,
      runtimeCaching: [
        {
          urlPattern: /\.(?:js|mjs|cjs|mp4|png|webp|svg|ico|css|glb|ttf|webmanifest|txt)$/, 
          handler: 'CacheFirst', // Fetch from cache, fallback to network
          options: {
            cacheName: 'js-cache',
            expiration: {
              maxEntries: 20,
              maxAgeSeconds: 360 * 24 * 60 * 60, // Cache JS files for 360 days
            },
            cacheableResponse: {
              statuses: [0, 200],
            },
          },
        },
      ],
    },
@moshetanzer
Copy link

Hey @crunchwrap89 are you by any chance using nuxt 4 compat?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants