-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt compatibility #9
Comments
Hey @hmaesta, sorry for the delay. Been off-grid last week! |
I won't be able to tell as I haven't used it with Nuxt. |
I'm facing it now, any thought? using const VueFormulateExtended = require('vue-formulate-extended')
//or
import VueFormulateExtended from 'vue-formulate-extended' returns this error: and I had to install imask separately {
"@braid/vue-formulate": "^2.5.2",
"vue-formulate-extended": "^1.1.1",
"imask": "^6.0.7",
}
import { pt } from '@braid/vue-formulate-i18n'
import '../node_modules/@braid/vue-formulate/themes/snow/snow.scss'
const VueFormulateExtended = require('vue-formulate-extended')
// import VueFormulateExtended from 'vue-formulate-extended'
export default {
plugins: [
pt,
VueFormulateExtended({
features: {
formEvents: true, // by-default
textMask: false, // by-default
enforceNumber: false, // by-default
},
}),
],
locale: 'pt',
classes: {
outer(context) {
switch (context.classification) {
case 'button':
return 'flex w-full justify-end'
default:
return 'mb-4 w-full'
}
},
input(context) {
switch (context.classification) {
case 'button':
return ' px-4 py-2 rounded bg-green-500 text-white hover:bg-green-600'
default:
return 'w-full px-3 py-2 rounded-lg border-2 border-gray-200 outline-none focus:border-primary-500'
}
},
label: 'font-medium text-sm',
help: 'text-xs mb-1 text-gray-600',
error: 'text-red-700 text-xs mb-1 border-red-500',
},
} and buildModules: [
'@braid/vue-formulate/nuxt',
], |
Any updates? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is vue-formulate-extended compatible with Nuxt SSR?
I am receiving
Unexpected identifier
just by placingVueFormulateExtended
on VueFormulate plugins.Codesandbox:
→ https://codesandbox.io/s/nuxt-vue-formulate-vue-formulate-extended-imask-89092
The text was updated successfully, but these errors were encountered: