ajv-validator / ajv-validator/ajv

Distribute ajv with pure esm using Conditional Exports

Open
#2,015 0 comments 13 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
14.8k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.