Open
Description
I've just been trying to add a service worker to try and make a PWA in the P5js Editor.
https://editor.p5js.org/hellonearthisman/sketches/fwp_5jja3 has the code to setup the service worker. I tried putting the code in the index.html and in the sketch setup.
I get this error (seen in console in present mode https://editor.p5js.org/hellonearthisman/present/fwp_5jja3 )
Service worker registration failed: TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.
Any tips on how to get this to work or why it won't work are welcome.