diff --git a/CHANGELOG.md b/CHANGELOG.md index cdbce31..8239103 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG ## 3.0.0 +- Add exports in package.json - This package is now pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). ## 2.0.1 diff --git a/package.json b/package.json index aaf8fda..72e8b25 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,31 @@ }, "author": "Microsoft", "license": "MIT", - "main": "lib/cjs/index.js", + "main": "lib/cjs/index.cjs", "module": "lib/esm/index.js", "types": "lib/cjs/index.d.ts", "sideEffects": false, "type": "module", + "exports": { + ".": { + "types": "./lib/esm/index.d.ts", + "require": "./lib/cjs/index.cjs", + "default": "./lib/esm/index.js" + }, + "./package.json": "./package.json", + "./parse": { + "types": "./lib/esm/parse.d.ts", + "require": "./lib/cjs/parse.cjs", + "default": "./lib/esm/parse.js" + } + }, + "typesVersions": { + "*": { + "parse": [ + "lib/esm/parse.d.ts" + ] + } + }, "files": [ "CHANGELOG.md", "lib",