I recently upgraded my app to react 18 and it is going smoother than I thought. I had to change how web workers worked with webpack 5 and I have followed the documentation.
const myWorker = new PromiseWorker(new Worker(new URL('../worker.ts', import.meta.url)));
This code works flawless in development. but when I build my app and install it on my device. The path to the web worker is incorrect and I'm not sure how I should workaround this.
https://MyHost/blah/blah/resources/static/js/webworker.js
https://MyHost/blah/blah/resources/static/js/static/js/webworker.js