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

Offline capability / SW #183

Open
NekR opened this issue Oct 13, 2016 · 4 comments
Open

Offline capability / SW #183

NekR opened this issue Oct 13, 2016 · 4 comments

Comments

@NekR
Copy link

NekR commented Oct 13, 2016

@insin are you interested in integrating offline-plugin into nwb? Do you think that would be possible with nwb's architecture? e.g. because offline-plugin requires runtime to be added to the entry file.

@insin
Copy link
Owner

insin commented Jan 14, 2017

Yes, definitely, I suppose that makes #203 a dupe of this, but I haven't used offline-plugin or the alternatives so don't know the pros and cons of each.

We can tweak entry config at any stage when we've detected that a feature has been enabled, be it cli options/user config or whatever.

@NekR
Copy link
Author

NekR commented Jan 14, 2017

@insin I think it's more like this blocks #203 since PWAs are more than just SW :-) I'll try to write pros and cons here of different libs today.

@NekR
Copy link
Author

NekR commented Jan 14, 2017

Okay, here are some pros/cons I wrote a while ago: facebook/create-react-app#192 (comment)

Other thing, probably not mentioned there is that sw-precache and its wrappers for webpack work very bad with webpack-dev-server and probably some other things. The reason is that it sw-precache doesn't use webpack's built-in mechanism to output files, but rather just write it to the file system. This obviously couldn't work normally with dev-server since it uses in-memory file system.

Other pros of offline-plugin:

  • More downloads: 210k month vs ~30k month sw-precache
  • sw-precache/sw-toolbox are kind of deprecated. Google still supports them, but they work on "new kind of ServiceWorker tools" which aren't even nearly ready for production.

Other cons of offline-plugin:

  • It isn't being done by Google
  • It has a bit fewer functionality than sw-precache
  • ??? something else

/cc @developit

@tomByrer
Copy link

sw-precache has more stars & forks.
offline-plugin is more recently & frequently updated.

Preact CLI uses sw-precache now. but Preact's website uses offline-plugin 😆

Any news adding one of these?

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

No branches or pull requests

3 participants