Skip to content

Build-time prop validation for CodeHike – feedback requested #526

@gurkerl83

Description

@gurkerl83

I noticed CodeHike currently uses runtime prop validation with Zod (when not using React Server Components). This works well, but Zod's bundle size might be a concern for some environments.
I've been working on an alternative approach: recma-static-refiner, a build-time plugin that validates and transforms MDX props during compilation rather than at runtime. It uses Standard Schema (Zod, Valibot, or ArkType) at build time - zero validation code ships to the client.
The README includes a CodeHike-specific example showing how meta props can be validated and transformed. I'd love to get your thoughts on whether this pattern could complement CodeHike's architecture.

Any feedback welcome!

Thx!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions