Skip to content

Commit 2956c07

Browse files
fix: import resolve issue (#38)
* fix: make package.json export paths relative to the current directory explicitly * add a test case that imports esm --------- Co-authored-by: Renée Kooi <[email protected]>
1 parent 3be9f52 commit 2956c07

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"exports": {
88
"./package.json": "./package.json",
99
".": {
10-
"types": "dist/index.d.mts",
11-
"require": "dist/index.js",
12-
"default": "dist/index.mjs"
10+
"types": "./dist/index.d.mts",
11+
"require": "./dist/index.js",
12+
"default": "./dist/index.mjs"
1313
}
1414
},
1515
"author": "Renée Kooi <[email protected]>",

test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,7 @@ test('useListener', function () {
105105

106106
renderer.unmount()
107107
})
108+
109+
test('esm', async () => {
110+
await import('react-bus')
111+
})

0 commit comments

Comments
 (0)