From f7486cffe92111b26f30707496f371b7c017cd58 Mon Sep 17 00:00:00 2001 From: Homa Wong Date: Wed, 19 Jul 2023 12:38:23 -0700 Subject: [PATCH] fix: add exports field --- package.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package.json b/package.json index 30f06907..f688022e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,21 @@ "browser": "dist/browser-ponyfill.js", "react-native": "dist/react-native-ponyfill.js", "types": "index.d.ts", + "exports": { + ".": { + "types": "./index.d.ts", + "browser": "./dist/browser-ponyfill.js", + "react-native": "./dist/react-native-ponyfill.js", + "default": "./dist/node-ponyfill.js" + }, + "./polyfill": { + "types": "./index.d.ts", + "browser": "./dist/browser-polyfill.js", + "react-native": "./dist/react-native-polyfill.js", + "default": "./dist/node-polyfill.js" + }, + "./package.json": "./package.json" + }, "scripts": { "commit": "cz", "prepare": "husky install",