scottbedard / vuetober

A webpack starting point for single page apps with October CMS and Vue
http://vuetober.scottbedard.net
MIT License
243 stars 39 forks source link

How to include Plugins in Vue components? #23

Closed neil-nato closed 7 years ago

neil-nato commented 7 years ago

I have installed a plugin called 'simple contact us', how should I include it on a vue component?

scottbedard commented 7 years ago

Hi, I recommend installing plugins in the boot file, and then using a separate file to set them up. You can use the vue-router plugin as an example.

First, create a file that tells Vue to use your desired plugin, and set it up however you need to. https://github.com/scottbedard/oc-vuetober-theme/blob/master/src/app/plugins/router.js

Then, add a reference to your plugin installer in the boot file. https://github.com/scottbedard/oc-vuetober-theme/blob/master/src/app/boot.js#L10-L13

Hope this helps, good luck!