This will install the Braze Service Worker files into ./node_modules/@braze/service-worker where you can reference them locally. Note that the Braze Service Worker is only meant to be used along with the Braze Web SDK.
Usage
In your build process, copy node_modules/@braze/service-worker/service-worker.js to your web application's public root directory.
Then, using the Web SDK, provide the serviceWorkerLocation initialization option with the path to your service worker.
See our documentation pages for steps to integrate push notifications into your website using the Braze Web SDK.
@braze/service-worker 使用 SEE LICENSE IN https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。