ajv-validator / ajv-validator/ajv

Distribute ajv with pure esm using Conditional Exports

未关闭
#2,015 0 条评论 13 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
TypeScript
星标
14.8k
派生
1k
PR 合并指标
30 天内没有已合并 PR

描述

**What version of Ajv you are you using?**
8.11.0

**What problem do you want to solve?**
Can not using Ajv as pure ESM package. It looks it is currently distributed as CommonJS module.

**What do you think is the correct solution to problem?**
According to the [nodejs documentation](https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#conditional-exports):
>Conditional exports provide a way to map to different paths depending on certain conditions. They are supported for both CommonJS and ES module imports.

Maybe we can adopt this solution.

**Will you be able to implement it?**
Yes.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。