CRA precache fails because of .LICENSE extension

72 views Asked by At

So, we have a situation where in production the precache is failing on our PWA because of a weird .LICENSE file on our server that is giving us 404

specifically an error like this

uncaught (in promise) bad-precaching-response: bad-precaching-response :: [{"url"

How we can fix that?

1

There are 1 answers

0
Luca Trazzi On BEST ANSWER

Well, the fix is simple.

Our web-server returns only known file extensions, and .LICENSE is not one of them.

Just enable the ServeUnknownFileTypes flag on your StaticFileServer options info