NuxtN
Nuxt7mo ago
7 replies
Norbiros

Zod auto imports

Hi! I am using zod4 and nuxt. I want to do something like this:
import * as z from 'zod'

export default defineNuxtPlugin(() => {
  z.config(z.locales.pl())

  addImports({ name: '*', as: 'z', from: 'zod' })
})


But in the main app, without creating nuxt module. Is it even possible to use addImports here (i get errors about vue parts)?
Was this page helpful?