From 4a4d357c07932cd31158744d019a8796aa26e4e7 Mon Sep 17 00:00:00 2001 From: Leo Deng Date: Sat, 3 Feb 2018 15:32:48 +0800 Subject: [PATCH] amend Vue plugin usages with package manager and module loader --- docs/integrations/vue.rst | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) 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