Using OnseSignal (PWA, web workers) with Frontity

Hello, I’m not sure if this question would be in the correct thread, but here goes.

My understanding is that Frontity will not be able to support PWA’s until there is an update to the “Customize Webpack Configuration” feature as service workers need to be configured with webpack.

At this moment, I really need to explore webpack further as I do not understand how it works, or really what it does to be honest :sweat_smile:

With that being said though, would the webpack configuration feature be required for adding something like Onesignal to Frontity? My understanding is that Onesignal uses its own service workers and in my regular wordpress installations adds a service worker to the website.

I see that there is a node package and can also be configured with Google Tag Manager with a REST API existing as well.

Could this be a possible solution for now? Or more likely I am missing something as I am still fairly new at this.

I appreciate any feedback and thank you!

Hi @ShaGui,

I’ve moved this thread to this category

Yes, this is correct. This Feature is still in research and there are some other dependencies that need to be solved first (like enabling custom webpack configuration)

To be honest I don’t see a clear way of making this work with Frontity right now. I think there are some things that should be solved first

@luisherranz any thoughts here?

For One Signal you need to:

  • Load their library in the client.
  • Return their service worker.

Returning a service worker is not possible until we add server extensibility: Server Extensibility

EDIT: I have just realized that this is already possible in Embedded mode because the OneSignal WordPress plugin returns the service worker just fine.

What WordPress hosting service are you using @ShaGui?