diff --git a/packages/remark-cli/cli.js b/packages/remark-cli/cli.js index c95f9bcd..ac66289e 100755 --- a/packages/remark-cli/cli.js +++ b/packages/remark-cli/cli.js @@ -16,13 +16,15 @@ import {args} from 'unified-args' /** @type {Pack} */ const proc = JSON.parse( String( - // To do: this will break when we add export maps. - await fs.readFile(new URL(resolve('remark/package.json', import.meta.url))) + await fs.readFile( + new URL('package.json', resolve('remark', import.meta.url)) + ) ) ) + /** @type {Pack} */ const cli = JSON.parse( - String(await fs.readFile(new URL(resolve('./package.json', import.meta.url)))) + String(await fs.readFile(new URL('package.json', import.meta.url))) ) args({ diff --git a/packages/remark-cli/package.json b/packages/remark-cli/package.json index 152c8114..9f913937 100644 --- a/packages/remark-cli/package.json +++ b/packages/remark-cli/package.json @@ -23,7 +23,7 @@ "Titus Wormer (https://wooorm.com)" ], "type": "module", - "main": "index.js", + "exports": [], "bin": { "remark": "cli.js" }, diff --git a/packages/remark-parse/package.json b/packages/remark-parse/package.json index c60b5130..b97bb132 100644 --- a/packages/remark-parse/package.json +++ b/packages/remark-parse/package.json @@ -33,8 +33,7 @@ ], "sideEffects": false, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "exports": "./index.js", "files": [ "lib/", "index.d.ts", diff --git a/packages/remark-stringify/package.json b/packages/remark-stringify/package.json index 9b96082b..b29d692e 100644 --- a/packages/remark-stringify/package.json +++ b/packages/remark-stringify/package.json @@ -33,8 +33,7 @@ ], "sideEffects": false, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "exports": "./index.js", "files": [ "lib/", "index.d.ts", diff --git a/packages/remark/package.json b/packages/remark/package.json index 8f8d7899..d0c03269 100644 --- a/packages/remark/package.json +++ b/packages/remark/package.json @@ -31,8 +31,7 @@ ], "sideEffects": false, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "exports": "./index.js", "files": [ "index.d.ts", "index.js"