From 912b6f5380e80ada014aaa519fab51ae679fc043 Mon Sep 17 00:00:00 2001 From: nthurow Date: Wed, 3 Apr 2024 17:00:41 -0500 Subject: [PATCH] fix: include `"main"` and `"types"` fields to support legacy applications (#32) * fix: include `"main"` and `"types"` fields to support legacy applications Without these fields, applications which use certain legacy TypeScript settings (such as `"moduleResolution": "node"`) were not able to detect the type definitions for `@optum/react-core`. * Update package.json version --------- Co-authored-by: Niels Peschel <52583415+NielsJPeschel@users.noreply.github.com> --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1ff964e..d09e7c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@optum/react-hooks", - "version": "1.0.2-next.1", + "version": "1.0.2-next.2", "description": "A reusable set of React hooks", "repository": "https://github.com/Optum/react-hooks", "license": "Apache 2.0", @@ -12,6 +12,8 @@ "files": [ "build/**" ], + "main": "./build/cjs/index.js", + "types": "./build/types/cjs/index.d.ts", "devDependencies": { "@babel/preset-env": "^7.12.11", "@babel/preset-typescript": "^7.12.10",