Skip to content

Commit 048c4ea

Browse files
fix: fix incorrect CJS / ESM distribution (#17)
1 parent 3dc2804 commit 048c4ea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"version": "1.1.0",
1010
"author": "Greg Bergé <berge.greg@gmail.com>",
1111
"license": "MIT",
12-
"main": "dist/index.js",
13-
"module": "dist/react-merge-refs.esm.js",
14-
"typings": "dist/index.d.ts",
12+
"main": "./dist/index.js",
13+
"exports": "./dist/index.js",
14+
"typings": "./dist/index.d.ts",
1515
"repository": "github:gregberge/react-merge-refs",
1616
"funding": {
1717
"type": "github",
@@ -22,7 +22,7 @@
2222
"release": "standard-version && conventional-github-releaser --preset angular",
2323
"start": "tsdx watch",
2424
"test": "tsdx test",
25-
"build": "tsdx build"
25+
"build": "tsdx build --format cjs"
2626
},
2727
"devDependencies": {
2828
"@testing-library/react": "^11.2.5",

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as React from "react";
1+
import type * as React from "react";
22

33
export default function mergeRefs<T = any>(
44
refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>

0 commit comments

Comments
 (0)