{ "html": "
\n

Installation

\n

Raven.js and the Raven.js Vue plugin are distributed using a few different methods.

\n
\n

Using our CDN

\n

For convenience, our CDN serves a single, minified JavaScript file containing both Raven.js and the Raven.js Vue plugin. It should be included after Vue, but before your application code.

\n

Example:

\n
<script src="https://cdn.jsdelivr.net/vue/2.0.0-rc/vue.min.js"></script>\n<script src="https://cdn.ravenjs.com/3.20.1/vue/raven.min.js"\n    crossorigin="anonymous"></script>\n<script>Raven.config('___PUBLIC_DSN___').install();</script>\n
\n
\n

Note that this CDN build auto-initializes the Vue plugin.

\n
\n
\n

Using package managers

\n

Both Raven.js and the Raven.js Vue plugin can be installed via npm and Bower.

\n
\n

npm

\n
$ npm install raven-js --save\n
\n
\n
\n
\n

Bower

\n
$ bower install raven-js --save\n
\n
\n

In your main application file, import and configure both Raven.js and the Raven.js Vue plugin as follows:

\n
import Vue from 'vue';\nimport Raven from 'raven-js';\nimport RavenVue from 'raven-js/plugins/vue';\n\nRaven\n    .config('___PUBLIC_DSN___')\n    .addPlugin(RavenVue, Vue)\n    .install();\n
\n
\n
\n
\n
\n", "link": "https://docs.getsentry.com/clients/javascript/integrations/vue/", "id": "javascript-vue", "name": "Vue" }