janiskelemen/formvuelar

How to use it with Nuxt

CavalcanteLeo opened this issue · 1 comments

How to use it with Nuxt?

gotcha:

formvuelar.js

import Vue from 'vue'
import { FvlForm, FvlInput, FvlTextarea, FvlRadio, FvlSubmit } from 'formvuelar'

import 'formvuelar/dist/formvuelar.css'
const components = { FvlForm, FvlInput, FvlTextarea, FvlRadio, FvlSubmit }

Object.entries(components).forEach(([name, component]) => {
  Vue.component(name, component)
})

nuxt.config.js:

plugins: [
    { src: '~/plugins/formvuelar.js', mode: 'client' },
  ],