Customizations
In addition to the general configuration parameters defined in the main customization guide, some modules support additional, module-specific options. These properties are defined within the same configuration object passed to the configure() function or the actito-services.json file.
The following properties apply to the Push module:
serviceWorker
Specifies the location of your Service Worker file within the application. This file handles background push events and is required for web push notifications to function correctly.
Default: /sw.js
If your application structure places the Service Worker file elsewhere, make sure this path accurately reflects its hosted location (for example, /scripts/custom-sw.js).
serviceWorkerScope
Defines the scope under which the Service Worker operates. The scope determines which URLs the Service Worker will control within your application.
You can learn more about Service Worker scopes in the MDN documentation.
Example:
import { configure } from 'actito-web/core'
configure({
applicationKey: 'YOUR_APPLICATION_KEY',
applicationSecret: 'YOUR_APPLICATION_SECRET',
serviceWorker: '/scripts/custom-sw.js',
serviceWorkerScope: '/'
})
These settings are optional and only required if your application does not use the default Service Worker path or scope.