Home

Issue: 1359

Help with using vue-masonry (Failed to resolve directive: masonry)

[issue link]

Hey guys, wondering if I’m missing a step in trying to use vue-masonry with a NuxtJS site that is generated.

Here’s what I have

nuxt.config.js

  plugins: [
    {
      src: '~plugins/vue-masonry.js',
      ssr: false
    }
  ],

vue-masonry.js

import Vue from 'vue'
import VueMasonryPlugin from 'vue-masonry'

Vue.use(VueMasonryPlugin)

and then in the actual component template something like this

 <div v-masonry transition-duration="0.3s" column-width="0" item-selector=".item">
            <div v-masonry-tile class="item" v-for="(item, index) in items">
          

It keeps saying the directive cannot be resolved Failed to resolve directive: masonry. Seems like I’m missing a step on how to register directives from 3rd party components

Any help would be greatly appreciated!

This question is available on Nuxt.js community (#c1204)