Skip to content

Commit

Permalink
rework service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
mimecuvalo committed Nov 3, 2023
1 parent 326ad38 commit 939a892
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The following is a set of guidelines for contributing to this project. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. We're actively looking for folks interested in helping out and there are plenty of ways you can help!

Please take a moment to review this document in order to make the contribution process straightforward and effective for everyone involved.
Please take a moment to review this document in order to make the contribution process understandable and effective for everyone involved.

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions public/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ clientsClaim();
precacheAndRoute(self.__WB_MANIFEST);

// Set up App Shell-style routing, so that all navigation requests
// are fulfilled with your index.html shell. Learn more at
// are fulfilled with your service-worker.html shell. Learn more at
// https://developers.google.com/web/fundamentals/architecture/app-shell
const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$');
registerRoute(
// Return false to exempt requests from being fulfilled by index.html.
// Return false to exempt requests from being fulfilled by service-worker.html.
({ request, url }) => {
// If this isn't a navigation, skip.
if (request.mode !== 'navigate') {
Expand All @@ -44,7 +44,7 @@ registerRoute(

return true;
},
createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html')
createHandlerBoundToURL(process.env.PUBLIC_URL + '/service-worker.html')
);

// An example runtime caching route for requests that aren't handled by the
Expand Down

0 comments on commit 939a892

Please sign in to comment.