title: Custom Directive in nuxt js
body: <p>is there a way how to write a custom directive in nuxt js, which will work for ssr and also for frontend (or even for ssr only)? </p>
  
  <p>I tried it like in following documentation: 
  <a href="https://nuxtjs.org/api/configuration-render#bundleRenderer" rel="noreferrer">https://nuxtjs.org/api/configuration-render#bundleRenderer</a></p>
  
  <p>so I added this code:</p>
  
  <pre><code>  module.exports = {
        render: {
          bundleRenderer: {
            directives: {
              custom1: function (el, dir) {
                // something ...
              }
            }
          }
        }
      }
  </code></pre>
  
  <p>to nuxt.config.js</p>
  
  <p>then I use it in template as:</p>
  
  <pre><code>&lt;component v-custom1&gt;&lt;/component&gt;
  </code></pre>
  
  <p>but it doesn't work, it just throw the frontend error </p>
  
  <p>[Vue warn]: Failed to resolve directive: custom1</p>
  
  <p>And it doesn't seem to be working even on server side.</p>
  
  <p>Thanks for any advice.</p>