|
3 | 3 | "version": "8.26.1", |
4 | 4 | "description": "Monitor if a component is inside the viewport, using IntersectionObserver API", |
5 | 5 | "source": "./src/index.tsx", |
6 | | - "main": "./dist/react-intersection-observer.js", |
7 | | - "module": "./dist/react-intersection-observer.esm.js", |
8 | | - "unpkg": "./dist/react-intersection-observer.umd.js", |
| 6 | + "main": "./dist/index.js", |
| 7 | + "module": "./dist/index.mjs", |
9 | 8 | "types": "./dist/index.d.ts", |
10 | 9 | "exports": { |
11 | 10 | "./test-utils": { |
|
14 | 13 | }, |
15 | 14 | ".": { |
16 | 15 | "types": "./dist/index.d.ts", |
17 | | - "require": "./dist/react-intersection-observer.js", |
18 | | - "default": "./dist/react-intersection-observer.modern.mjs" |
| 16 | + "require": "./dist/index.js", |
| 17 | + "default": "./dist/index.mjs" |
19 | 18 | } |
20 | 19 | }, |
21 | 20 | "author": "Daniel Schmidt", |
|
28 | 27 | "scripts": { |
29 | 28 | "prebuild": "rm -rf dist lib", |
30 | 29 | "build": "run-s build:*", |
31 | | - "build:bundle": "microbundle --name ReactIntersectionObserver --jsx React.createElement -f cjs,umd,es,modern --no-compress", |
| 30 | + "build:bundle": "tsup src/index.tsx", |
32 | 31 | "build:utils": "tsc -p tsconfig.test.json", |
33 | 32 | "build:copy": "node scripts/build-copy.js", |
34 | 33 | "postbuild": "size-limit", |
35 | 34 | "dev": "run-p dev:*", |
36 | | - "dev:package": "microbundle --jsx React.createElement -f cjs,es,modern --no-compress --watch", |
| 35 | + "dev:package": "tsup src/index.tsx --watch", |
37 | 36 | "dev:storybook": "pnpm --filter storybook dev", |
38 | 37 | "lint": "eslint . --ext js,ts,tsx", |
39 | 38 | "release": "np --contents dist", |
|
100 | 99 | }, |
101 | 100 | "size-limit": [ |
102 | 101 | { |
103 | | - "path": "dist/react-intersection-observer.esm.js", |
| 102 | + "path": "dist/index.mjs", |
104 | 103 | "name": "InView", |
105 | 104 | "import": "{ InView }", |
106 | 105 | "limit": "1.8 kB" |
107 | 106 | }, |
108 | 107 | { |
109 | | - "path": "dist/react-intersection-observer.esm.js", |
| 108 | + "path": "dist/index.mjs", |
110 | 109 | "name": "useInView", |
111 | 110 | "import": "{ useInView }", |
112 | 111 | "limit": "1.3 kB" |
113 | 112 | }, |
114 | 113 | { |
115 | | - "path": "dist/react-intersection-observer.esm.js", |
| 114 | + "path": "dist/index.mjs", |
116 | 115 | "name": "observe", |
117 | 116 | "import": "{ observe }", |
118 | 117 | "limit": "1 kB" |
|
144 | 143 | "react-dom": "^18.2.0", |
145 | 144 | "simple-git-hooks": "^2.8.1", |
146 | 145 | "size-limit": "^8.2.4", |
| 146 | + "tsup": "^6.7.0", |
147 | 147 | "typescript": "^4.9.5", |
148 | 148 | "vitest": "^0.31.3" |
149 | 149 | }, |
|
0 commit comments