Skip to content

Commit e84a1ad

Browse files
committed
Prefer require, import and types exports over browser
Exports are resolved in order, i.e. the first match is used. I'm not sure why the browser export is using the raw src, however this causes issues with Jest when configured with jsdom, as it will resolve to this file and not be able to transpile it. Jest also throws a type error as discussed on remix-run/remix#3402
1 parent f5a5e15 commit e84a1ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/fetch/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"type": "module",
1010
"exports": {
1111
".": {
12-
"browser": "./src/lib.js",
1312
"require": "./dist/lib.node.cjs",
1413
"import": "./src/lib.node.js",
15-
"types": "./dist/src/lib.node.d.ts"
14+
"types": "./dist/src/lib.node.d.ts",
15+
"browser": "./src/lib.js"
1616
},
1717
"./package.json": "./package.json",
1818
"./body": {

0 commit comments

Comments
 (0)