diff --git a/package.json b/package.json index 504cec3c..02370933 100644 --- a/package.json +++ b/package.json @@ -17,14 +17,14 @@ "module": "./dist/esm/index.mjs", "exports": { ".": { - "require": "./dist/index.js", + "types": "./dist/index.d.ts", "import": "./dist/esm/index.mjs", - "types": "./dist/index.d.ts" + "require": "./dist/index.js" }, "./*": { - "require": "./dist/*.js", + "types": "./dist/*.d.ts", "import": "./dist/esm/*.mjs", - "types": "./dist/*.d.ts" + "require": "./dist/*.js" } }, "typesVersions": { diff --git a/scripts/pack.ts b/scripts/pack.ts index bff9a066..ffec4c0f 100644 --- a/scripts/pack.ts +++ b/scripts/pack.ts @@ -33,11 +33,11 @@ export const copyPackageJson: Build = C => module: './_esm/index.mjs', exports: { '.': { + types: './index.d.ts', import: './_esm/index.mjs', require: './index.js', - types: './index.d.ts', }, - './*': { import: './_esm/*.mjs', require: './*.js', types: './*.d.ts' }, + './*': { types: './*.d.ts', import: './_esm/*.mjs', require: './*.js' }, }, publishConfig: { access: 'public',