diff --git a/package.json b/package.json index 685105be..901b4cb8 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,16 @@ "main": "./dist/cjs/src/index.js", "module": "./dist/mjs/src/index.js", "bin": "./dist/cjs/src/bin.js", - "types": "./dist/cjs/src/index.d.ts", "exports": { ".": { - "types": "./dist/cjs/src/index.d.ts", - "import": "./dist/mjs/src/index.js", - "require": "./dist/cjs/src/index.js" + "import": { + "default": "./dist/mjs/src/index.js", + "types": "./dist/mjs/src/index.d.ts" + }, + "require": { + "default": "./dist/cjs/src/index.js", + "types": "./dist/cjs/src/index.d.ts" + } } }, "files": [ diff --git a/test/index.js b/test/index.js index d0fe6ecc..74929d0f 100644 --- a/test/index.js +++ b/test/index.js @@ -4,9 +4,14 @@ t.same( require('../package.json').exports, { '.': { - types: './dist/cjs/src/index.d.ts', - import: './dist/mjs/src/index.js', - require: './dist/cjs/src/index.js', + import: { + default: './dist/mjs/src/index.js', + types: './dist/mjs/src/index.d.ts', + }, + require: { + default: './dist/cjs/src/index.js', + types: './dist/cjs/src/index.d.ts', + }, }, }, 'nothing else exported except main'