Open samuelmeuli opened 4 years ago
Yes, that's a good idea. I've added the banner component to both PRs :)
@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).
This PR adds PWA features to the React app. All PWA-related Lighthouse checks will pass with these changes.
PWA-related changes:
create-react-app
is not sufficient because it only covers files which are part of the React app, i.e. not AEM resources that are requested from other pathsI'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:
node-sass
tosass
(Dart implementation) for compatibility with the latest macOS versionreact-scripts
(create-react-app
) andaem-clientlib-generator
because the newer versions include changes that allow code splitting and better SPA asset handling with AEM ClientLibsaem-clientlib-generator
config to the latest one from the archetype (same reason)