with-next-offline
To be honest, the service-worker path configuration is so much complicated, and with "zero config:, like this example, it is not working.
These are steps to reproduce platform-independently.
docker run --rm -it -v "$pwd":/app -w /app -p 3000:3000 node:10.15.3-jessie npm i && npm run build && npm start
A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
In a lot of other issues of next-offline this problem is faced.
@pPanda-beta As per the with-next-offline README, you have to run npm run export instead of npm run build && npm start.
Let me know if your use case differs from serving content statically, I will be happy to fix it for you.
@aganglada I am experiencing same issue, as content is not served statically.
@pPanda-beta @kobbiman let me have a look and fix that example for you
@aganglada
Thank you for the fix.
I am having some issues with the with-next-offline example:
SW registration failed: DOMException: Failed to register a ServiceWorker for scope ('http://localhost:5000/') with script ('http://localhost:5000/service-worker.js'): The script has an unsupported MIME type ('text/html').
I followed the steps that are stated in the readme:
https://github.com/zeit/next.js/tree/canary/examples/with-next-offline
@aganglada ^
Let me have a look, thanks for pinging @lfades
Most helpful comment
Let me have a look, thanks for pinging @lfades