Skip to content

Commit

Permalink
change/API! ~ add package 'exports' to publicize ESM support
Browse files Browse the repository at this point in the history
- reveals ESM wrapper providing ESM support (as suggested in "Node Modules at War")

* ref: [Node Modules at War](https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1) @@ <https://archive.is/zl0qg>
* ref: [yargs ~ 'Road to ESM/Deno'](yargs/yargs#1706).
  • Loading branch information
rivy committed Feb 10, 2021
1 parent f601bce commit de48f6d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions package.json
Expand Up @@ -21,7 +21,19 @@
],
"type": "commonjs",
"main": "./dist/cjs/index.js",
"module": "./dist/cjs/esm-wrapper/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": [
{
"import": "./dist/cjs/esm-wrapper/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
},
"./dist/cjs/index.js"
]
},
"keywords": [
"base",
"cache",
Expand Down

0 comments on commit de48f6d

Please sign in to comment.