Skip to content

Commit 1743dfd

Browse files
authored
fix: add package exports field for correct interop and bundler support (#1653)
* fix: add package exports field for correct interop and bundler support * fix: Add types fields to exports field in package.json * fix: Add default fields to exports field in package.json
1 parent a22871f commit 1743dfd

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ flow-coverage/
3131
.env.production.local
3232

3333
npm-debug.log*
34+
35+
# IDE settings
36+
.idea

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@
4747
"preact",
4848
"flow-typed"
4949
],
50+
"exports": {
51+
".": {
52+
"import": "./dist/downshift.esm.js",
53+
"require": "./dist/downshift.cjs.js",
54+
"types": "./typings/index.d.ts",
55+
"default": "./dist/downshift.esm.js"
56+
},
57+
"./react-native": {
58+
"require": "./dist/downshift.native.cjs.js",
59+
"types": "./typings/index.d.ts"
60+
}
61+
},
5062
"keywords": [
5163
"enhanced input",
5264
"react",

0 commit comments

Comments
 (0)