diff --git a/docs/integrations/vue.rst b/docs/integrations/vue.rst index 6d38ed850d7e..05a28f42fc00 100644 --- a/docs/integrations/vue.rst +++ b/docs/integrations/vue.rst @@ -27,8 +27,7 @@ Example: .. sourcecode:: html - + Note that this CDN build auto-initializes the Vue plugin. @@ -45,6 +44,17 @@ npm $ npm install raven-js --save +.. code-block:: html + + + + + Bower ````` @@ -53,6 +63,27 @@ Bower $ bower install raven-js --save +.. code-block:: html + + + + + + +These examples assume that Vue is exported globally as `window.Vue`. You can alternatively pass a reference to the `Vue` object directly as the second argument to `addPlugin`: + +.. code-block:: javascript + + Raven.addPlugin(Raven.Plugins.Vue, Vue); + +Module loaders +~~~~~~~~~~~~~~ + In your main application file, import and configure both Raven.js and the Raven.js Vue plugin as follows: .. code-block:: js