Skip to content

Commit 571c948

Browse files
authored
Merge pull request #568 from thebuilder/fix/revert-to-esm-js
2 parents e59d9c2 + 3bb4639 commit 571c948

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API",
55
"source": "./src/index.tsx",
66
"main": "./dist/react-intersection-observer.js",
7-
"module": "./dist/react-intersection-observer.mjs",
7+
"module": "./dist/react-intersection-observer.esm.js",
8+
"unpkg": "./dist/react-intersection-observer.umd.js",
9+
"types": "./dist/index.d.ts",
810
"exports": {
9-
"./test-utils": "./test-utils.js",
11+
"./test-utils": "./dist/test-utils.js",
1012
".": {
11-
"require": "./react-intersection-observer.js",
12-
"default": "./react-intersection-observer.modern.mjs"
13+
"require": "./dist/react-intersection-observer.js",
14+
"default": "./dist/react-intersection-observer.modern.mjs"
1315
}
1416
},
15-
"unpkg": "./dist/react-intersection-observer.umd.js",
16-
"typings": "./dist/index.d.ts",
1717
"author": "Daniel Schmidt",
1818
"sideEffects": false,
1919
"repository": {
@@ -96,19 +96,19 @@
9696
},
9797
"size-limit": [
9898
{
99-
"path": "dist/react-intersection-observer.mjs",
99+
"path": "dist/react-intersection-observer.esm.js",
100100
"name": "InView",
101101
"import": "{ InView }",
102102
"limit": "1.8 kB"
103103
},
104104
{
105-
"path": "dist/react-intersection-observer.mjs",
105+
"path": "dist/react-intersection-observer.esm.js",
106106
"name": "useInView",
107107
"import": "{ useInView }",
108108
"limit": "1.3 kB"
109109
},
110110
{
111-
"path": "dist/react-intersection-observer.mjs",
111+
"path": "dist/react-intersection-observer.esm.js",
112112
"name": "observe",
113113
"import": "{ observe }",
114114
"limit": "1 kB"

scripts/build-copy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const fields = [
3636
'exports',
3737
'esmodule',
3838
'exports',
39+
'types',
3940
'typings',
4041
];
4142
fields.forEach((key) => {

0 commit comments

Comments
 (0)