Solved
How to enable PWA on React + AEM SPA? (404 error)
I am following this tutorial: https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-spa-wknd-tutorial-develop/react/chapter-3.html#help
and haven't found a way to install a service worker.
I did try by:
- Creating a service-worker.js file in the react-app/scr folder.
- Importing and registering it on the index.js file
[ So far, just as any regular react app] - Adding the reference to service-worker file in the clientlib.config.js file in the libs:assets:js arraylibs: {...assets: {js: ["build/static/**/*.js","build/service-worker.js"],That got the service-worker.js from the react-app/build to the ui.apps/... /clientlibs/react-app/js/service-worker.jsbut when running the aem instance I got an 404 error on the service-worker.js file request.
