First, add the
package.json. Then, run
npm install. You'll also need a Push API key from the "Push and deploy" section of your App settings page.
You can also add these packages to your
package.json on the command line:
You can then import and use the package in your bundle:
It’s recommended (although not necessarily required) to use the instance of the
Appsignal object like a singleton. One way that you can do this is by
exporting an instance of the library from a
.ts file somewhere in your project.
Currently, we have no plans to supply a CDN-hosted version of this library.
This package can be used in any ECMAScript 5 compatible browser. We aim for compatibility down to Internet Explorer 9 (roughly 0.22% of all browsers used today). All browsers older than this can only supported on a “best effort” basis, and full functionality cannot be guaranteed.
When developing, don’t forget to check browser support on Can I Use? and the ES6 Compatibility Table, and provide the appropriate polyfills or fallbacks. In a small percentage of browsers, a
Promise polyfill may be required to use this library.