Closed polynook closed 2 months ago
Show me the reproducible repo
If you want to use the meta
object in the schema transform
, you must use the s
provided by velite
.
import { s } from `velite`
s.custom()
instead of
import { custom } from 'zod'
custom()
because the meta
is not built-in feature in zod
Steps to reproduce:
custom
fromzod
tomdxBundle.ts
file to fix the module not found error.body: mdx()
withbody: mdxBundle()
in the Page collection in thevelite.config.ts
:This results in the following error:
I removed the destructuring of
meta
and console-log'ed bothvalue
andmeta
and both of them areundefined
.