Nuxt Plugins – How to use arbitrary Vue libraries in your NuxtJS app

Not all VueJS libraries work out of the box with Nuxt. Some of them have custom modules, others have Nuxt or SSR-specific instructions, but for the rest we have to make our own plugin. Fortunately, making our own plugins is pretty simple!

In this tutorial we create a Nuxt plugin for the vuetify-datetime-picker library. This is an ES6 plugin, so we’ll see how to put it into our transpilation pipeline.

Once we have everything working, the final section will be using the new library within our app to create and use a custom published_at date.

0:00 Start
1:45 Installing a Nuxt plugin
6:49 Integrating the plugin with our app’s UI

The “Building a VueJS Screencasting App From Scratch” Playlist: https://www.youtube.com/playlist?list=PLPwpWyfm6JADRf8x1Jc0Da8R71WJyt-Jn

*** Github Links ***

Install and use Nuxt Plugin: https://github.com/jeffreybiles/vue-screencasts-nuxt/commit/af76b80
Improve usage of vuetify-datetime-picker within the app: https://github.com/jeffreybiles/vue-screencasts-nuxt/commit/172c966

*** Find me online ***

Twitter: http://twitter.com/vuescreencasts
Website coming soon!

#Nuxt #Plugins #VueJS #Integration #Libraries #Packages #Vuetify #Tutorial

Post Author: hatefull