Open NekR opened 8 years ago
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.
@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.
Okay, here are some pros/cons I wrote a while ago: https://github.com/facebookincubator/create-react-app/issues/192#issuecomment-235095536
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
:
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
:
sw-precache
/cc @developit
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?
@insin are you interested in integrating
offline-plugin
intonwb
? Do you think that would be possible withnwb
's architecture? e.g. becauseoffline-plugin
requires runtime to be added to the entry file.