Workbox is working perfectly in local development. But when deployed to Elastic Beanstalk, EB is not able to register the service worker. Everything is working from Express view engine, webpack build files, etc. The only problem is that the Workbox is not detected.
Build flow is from Git, to Travis, then deploy to EB.
So far, tried everything. I even SSH to the EC2 instance to check if the build files are really there, existing. And all files are present.
Also, what I noticed is that the EC2 instance used by EB has a Node version of 8.16.0 but inside Elastic Beanstalk Configuration => Software, the Node version is 10.16.0 I don't which is being used really.
The solution in this case would be to ensure that the build is served over HTTPS. A quick way to setup HTTPS on AWS / EC2 is using a Cloudfront distribution. You may also test by using HTTPS via a S3 static website.