I have created a package that supports on pwa and spa modes.
https://github.com/motia/quasar-app-extension-onesignal
You will need to add the pwa mode to your quasar app. then modify the src-pwa/register-service-worker.js
to register OneSignalSDKWorker.js
.
The package will create a OneSignalSDKWorker.js
at the root of your app with the following content
importScripts('/service-worker.js?xxxxx', 'https://cdn.onesignal.com/sdks/OneSignalSDKWorker.js');