diff --git a/package.json b/package.json index a21879930..6354b07b7 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,35 @@ "README.md" ], "types": "types/index.d.ts", + "typesVersions": { + "*": { + "node": ["types/node.d.ts"], + "react-native": ["types/react-native.d.ts"] + } + }, + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./index.js" + }, + "./node": { + "types": "./types/node.d.ts", + "default": "./node.js" + }, + "./react-native": { + "types": "./types/react-native.d.ts", + "default": "./react-native.js" + }, + "./react-native.js": { + "types": "./types/react-native.d.ts", + "default": "./react-native.js" + }, + "./weapp": { + "default": "./weapp.js" + }, + "./dist/*": "./dist/*", + "./lib/*": "./lib/*" + }, "browser": { "react-native": false },