ajv-validator / ajv-validator/ajv

Distribute ajv with pure esm using Conditional Exports

Aperta
#2,015 0 commenti 13 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
TypeScript
Stelle
14.8k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.