Skip to content

service worker swallows requests for files added to public/ #3008

Closed
@chee

Description

@chee

Is this a bug report?

i can't tell, i suppose not.

Which terms did you search for in User Guide?

"service worker"

explanation

on my blog, the posts are stored in a file called posts.json, which i keep in public/.
the route for printing out a handsome html list of posts data is /posts.

the posts themselves are built from markdown files that live in, for example,
public/posts/an-example-slug.md. the url for the react rendered version of that
post is /posts/an-example-slug.

a cute feature of that has been that if you would like to view the source of one of
the posts, you can just add .md to the end of the url and there it
appears in all its monospace fancy.

i was working on some feature changes last night and this morning, and i've
upgraded react-scripts and have my setup working nicely with the service worker.
except now the service worker jumps in between me and my public/ file request.

i'm just now realising it is also eating requests for my feed.rss and manifest.json and i'm beginning to wonder if i have done something terribly wrong.

can you think of anything i can do without ejecting?
i suppose i can generate my own service worker based on the lodash template.

related

#2253
#2714

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions