question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AppCache / ServiceWorker support

See original GitHub issue

Do you need AppCache / ServiceWorker support in this project? I wrote a offline-plugin for webpack and it’s currently used in react-boilerplate. If you think it would be good to have “offline” support in this project, I will send a PR for it.

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

13reactions
jeffposnickcommented, Aug 11, 2016

As an exercise, I put together a repo that illustrates the modifications needed “Progressive Web App-ify” the create-react-app output, assuming sw-precache is used to generate the service worker.

There are details in https://github.com/jeffposnick/create-react-pwa/blob/master/README.md and a rundown of the (minor!) changes that were needed can be found in the diff: https://github.com/jeffposnick/create-react-pwa/compare/starting-point...pwa

I’ll probably spread the word a bit via my personal blog in case there are other folks who want to manually make those changes to their local create-react-app output.

12reactions
jeffposnickcommented, Jul 27, 2016

I work on the team at Google that develops the sw-precache and sw-toolbox libraries, which are similar in scope (though implemented differently) than the offline-plugin project that @NekR maintains. Hopefully this does not come across as upstaging @NekR’s request, but creating a separate issue and having a parallel discussion there doesn’t make much sense.

We had a similar question about how open the maintainers of this project would be to integration. To give an example of what that might look like, a member of the community, @localnerve, developed https://github.com/localnerve/react-pwa-reference as a boilerplate React project with those libraries baked in.

If your preference is to keep what ships by default minimal, or if you’d prefer default integration with another library like offline-plugin, we could focus on providing guidance in our own documentation, explaining how developers who start with create-react-app can explicitly add and configure sw-precache after the fact.

CC: @addyosmani

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Service Workers - Web APIs | MDN
A service worker functions like a proxy server, allowing you to modify requests and responses replacing them with items from its own cache....
Read more >
Service Workers replacing AppCache: a sledgehammer to ...
If you are into web development, you have probably heard about Service Workers, sometimes referred as “the Application Cache replacement”.
Read more >
Comparison between service worker and AppCache
What are the core differences between service worker and AppCache. What are the pros and cons of each and when to prefer one...
Read more >
Service Workers vs. AppCache - unop.uk
AppCache has many problems but is almost universally supported. Service Workers are fantastic but are not yet widely adopted. It seems a bit ......
Read more >
Service worker overview - Chrome Developers
Service workers are specialized JavaScript assets that act as proxies between web browsers and web servers. They aim to improve reliability by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found