N
Nuxt5mo ago
maroo

How can I use defineModel in modules?

I am writing a module that supplies a number of components to help with input and output. I want to simplify the implementation by using defineModel, but it doesn't work as expected. I can avoid the error by specifying nuxt.options.vite.vue.script['defineModel'] = true in the module's setup(). But substituting a .value does not change the value
const open = defineModel<boolean>({
required: false,
default: false,
})
// ...
open.value = true // does not effect
const open = defineModel<boolean>({
required: false,
default: false,
})
// ...
open.value = true // does not effect
Where should I refer to change the vite option when compiling a module?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server