bugsnag-nuxt

1.0.3 • Public • Published

Bugsnag: Vue

Build Status NPM

A bugsnag-js plugin for Vue.js.

This package enables you to integrate Bugsnag's error reporting with a Vue.js application at a detailed level. It creates and configures a Vue ErrorHandler which will capture and report unhandled errors in your app.

Reported errors will contain useful debugging info from Vue's internals, such as the component name, props and any other context that Vue can provide.

Installation

You can opt to install the package from npm, using the instructions below. Alternatively you can load the plugin from our CDN via a <script/> tag.

npm

npm i --save bugsnag-js bugsnag-nuxt
# or 
yarn add bugsnag-js bugsnag-nuxt

Usage

Depending on how your application is structured, usage differs slightly:

Inline script tag

The script tag creates a global function called bugsnag__nuxt which needs to be passed a reference to the Vue object. Ensure that Vue is loaded/available before calling this function.

<script>
  window.bugsnagClient = bugsnag('API_KEY')
  // after Vue has been loaded…
  bugsnagClient.use(bugsnag__nuxt(Vue))
</script> 

See the examples for more info.

Bundled

If you installed the package from npm, usage will look more like the following snippet. Again, ensure you have a reference to Vue before you create the plugin.

const Vue = require('vue')
const bugsnag = require('bugsnag-js')
const bugsnagNuxt = require('bugsnag-nuxt')
 
const bugsnagClient = bugsnag('API_KEY')
bugsnagClient.use(bugsnagNuxt(Vue))

Support

License

The Bugsnag JS library and official plugins are free software released under the MIT License. See LICENSE.txt for details.

Readme

Keywords

none

Package Sidebar

Install

npm i bugsnag-nuxt

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

109 kB

Total Files

17

Last publish

Collaborators

  • jcardell