sindresorhus / p-map

Map over promises concurrently
MIT License
1.27k stars 58 forks source link

Support esm and commonjs exports in package.json #45

Closed targeral closed 3 years ago

targeral commented 3 years ago

Is it possible to provide exports in both esm and cjs formats. For example:

{
    "exports": {
        ".": {
             "node": {
                  "import": "./index.mjs",
                  "require": "./index.cjs"
              },
              "default": "./index.mjs"
        }
    }
}
sindresorhus commented 3 years ago

Possible yes, feasible no: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#gistcomment-3850849