caolan/async

async package should distribute both cjs and esm

开放

#1,879 创建于 2022年11月15日

 (1 条评论) (7 个反应) (0 位负责人)JavaScript (2,398 个派生)batch import
help wanted

仓库指标

星标
 (28,067 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

There is no real need for async-es package. It ends up complicating async usage downstream especially for projects which emit both cjs and esm. And to complicate things, async-es has a main entry which points to esm (without indicating type: 'module'), so it can't be used for cjs scenarios.

Recommended:

Update the async package.json with:

  1. main pointing to commonjs. (this is only for backwards compatibility.)
  2. module pointing to esm. (this is only for backwards compatibility.)
  3. exports map explicitly listing the valid imports and the cjs/esm/d.ts files to resolve to.

贡献者指南