Adobe-Marketing-Cloud / aem-guides-wknd-events

Step by Step guide to creating a Single Page Application to use with AEM
48 stars 34 forks source link

[React] Add PWA features #72

Open samuelmeuli opened 4 years ago

samuelmeuli commented 4 years ago

This PR adds PWA features to the React app. All PWA-related Lighthouse checks will pass with these changes.

PWA-related changes:

I've tried to add as many code comments as possible, so the implementation details should hopefully be self-explanatory. @godanny86, please let me know if I can clarify anything :)

Other required changes:

samuelmeuli commented 4 years ago

Yes, that's a good idea. I've added the banner component to both PRs :)

samuelmeuli commented 4 years ago

@godanny86 As discussed, I've replaced the ServiceWorkerHeaderFilter Sling filter with a custom Dispatcher config (copied from WKND Sites and extended by a rule which adds the Service-Worker-Allowed header to the service-worker.js file, see a42cadd).