Specifying a version

Options for specifying and locking a version of bugsnag-js installed via CDN

Minor version wildcards

The URL in the example below specifies the version to be v4. Each release is versioned according to semver, and 4 is just the “major” part. This allows you to receive updates as new minor and patch versions are published:

<script src="//d2wy8f7a9ursnm.cloudfront.net/v4/bugsnag.min.js"></script>

When a new major version of bugsnag-js is released, you will need to update the URL accordingly to receive updates.

To only allow patch releases, specify the major and minor components: v4.0

Or, lock down an exact version: v4.0.0

See semver.org for information on the semantics of version numbers.

To use the non-minified version, substitute bugsnag.min.js for bugsnag.js in your script tag. Given that the minified version ships with source maps, this is not recommended outside of specific use cases (for example, debugging an issue in a browser that doesn’t support source maps).