Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-bugsnag

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-bugsnag

Vue.js plugin for bugsnag js v3.x error reporting

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Vue Bugsnag

vue-js downloads npm-version github-tag license build-status codecov

Vue.js plugin for bugsnag-js v3.x error reporting

:warning: Deprecation notice

Bugsnag has released their official Vue.js plugin.
You can keep using this plugin if you don't want to upgrade to Bugsnag js v4.x. It is recommended to upgrade to Bugsnag js v4.x.

Bugsnag Dashboard

Installation

# npm
npm install vue-bugsnag --save

# Yarn
yarn add vue-bugsnag

Usage

  • Grab your API key from Bugsnag
import Bugsnag from 'bugsnag-js';
Bugsnag.apiKey = 'YOUR-API-KEY-HERE';
  • Plug into Vue.js
import Vue from 'vue';
import VueBugsnag from 'vue-bugsnag';
Vue.use(VueBugsnag);
  • Prevent Bugsnag from being initialized in development
if (process.env.NODE_ENV === 'production') {
  // Initialize Bugsnag here
}
  • Limit error reporting to specific release stages
Bugsnag.releaseStage = 'YOUR-CURRENT-ENVIRONMENT';
Bugsnag.notifyReleaseStages = ['staging', 'production'];

Use with Vue Router

router.afterEach((to, from) => {
    Bugsnag.refresh();
});

Laravel Mix user?

Checkout this guide

Use in browser (without webpack)

  • Include required files
<!-- Add Bugsnag core library -->
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-3.min.js"
        data-apikey="YOUR-API-KEY-HERE"></script>
<!-- Vue js -->
<script src="https://unpkg.com/vue@2.5/dist/vue.min.js"></script>
<!-- Lastly add this package -->
<script src="https://unpkg.com/vue-bugsnag"></script>
  • That's it, plugin will auto initialize.

How does it work?

  • This plugin utilize Vue.js inbuilt error handler
  • This plugin prepares a payload and send this to Bugsnag as metadata
  • This metadata will appear on a new tab in Bugsnag dashboard.

Testing

  • This package is using Jest for testing.
  • Tests can be found in __test__ folder.
  • Execute tests with this command yarn test

Credits and Thanks

Resources

License

MIT License

Keywords

FAQs

Package last updated on 09 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc