Skip to content

Commit 386b679

Browse files
authored
Add package exports (#25)
This ensures the browser API is used for the `browser` condition, and the Node.js API for everything else.
1 parent 593af18 commit 386b679

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
"./lib/node/main.js": "./lib/browser/main.js"
88
},
99
"typings": "./api",
10+
"exports": {
11+
".": {
12+
"types": "./api.d.ts",
13+
"browser": "./lib/browser/main.js",
14+
"default": "./lib/node/main.js"
15+
}
16+
},
1017
"author": "Microsoft Corporation",
1118
"repository": {
1219
"type": "git",

0 commit comments

Comments
 (0)