anatine / zod-plugins

Plugins and utilities for Zod
591 stars 84 forks source link

[zod-openapi] Issue when used in an ESM project #168

Closed oschwede closed 8 months ago

oschwede commented 8 months ago

I'm getting issues when using zod-openapi within an ESM project, caused by a deep import in packages/zod-openapi/src/lib/zod-extensions.ts

import {ZodTypeDef} from "zod/lib/types";

When I change it to a regular, non-deep import like this:

import {ZodTypeDef} from "zod";

everything is fine. Has the deep import any specific reason?