From 3f15e146ff2272569fd232b2f73f4549a35d4a7a Mon Sep 17 00:00:00 2001 From: Brian Chirls Date: Mon, 1 Aug 2022 09:37:27 -0400 Subject: [PATCH] Fix package.json again - fix types path - add typesVersions section to fix typescript paths - don't include source files in package known issue: typescript still cannot find types if you just import the whole library. --- package-lock.json | 2 +- package.json | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index dd24634..7099ddd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@brianchirls/game-input", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 9b752dd..7fa7c6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@brianchirls/game-input", - "version": "0.0.2", + "version": "0.0.3", "description": "", "repository": { "type": "git", @@ -14,7 +14,7 @@ "module": "dist/esm/index.js", "browser": "dist/esm/browser.js", "unpkg": "dist/browser.js", - "types": "./types/browser.d.ts", + "types": "./dist/types/browser.d.ts", "exports": { ".": { "node": "./dist/cjs/index.js", @@ -24,16 +24,21 @@ "types": "./dist/types/browser.d.ts" }, "./*": { - "require": "./dist/cjs/*.js", + "types": "./dist/types/*.d.ts", "import": "./dist/esm/*.js", - "default": "./dist/esm/*.js", - "types": "./dist/esm/*.d.ts" + "require": "./dist/cjs/*.js", + "default": "./dist/cjs/*.js" } }, + "typesVersions": { + "*": { + "*": [ + "./dist/types/*" + ] + } + }, "files": [ - "dist/*", - "src/**/*.js", - "src/**/*.ts" + "dist/*" ], "keywords": [ "game",