|
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" |
|
126 | 125 | "@testing-library/jest-dom": "^5.16.5", |
127 | 126 | "@testing-library/react": "^14.0.0", |
128 | 127 | "@types/jest": "^29.5.2", |
129 | | - "@types/react": "^18.2.7", |
130 | | - "@types/react-dom": "^18.2.4", |
131 | | - "@typescript-eslint/eslint-plugin": "^5.59.8", |
132 | | - "@typescript-eslint/parser": "^5.59.8", |
133 | | - "eslint": "^8.41.0", |
| 128 | + "@types/react": "^18.2.12", |
| 129 | + "@types/react-dom": "^18.2.5", |
| 130 | + "@typescript-eslint/eslint-plugin": "^5.59.11", |
| 131 | + "@typescript-eslint/parser": "^5.59.11", |
| 132 | + "eslint": "^8.43.0", |
134 | 133 | "eslint-plugin-import": "^2.27.5", |
135 | 134 | "eslint-plugin-jsx-a11y": "^6.7.1", |
136 | 135 | "eslint-plugin-react": "^7.32.2", |
|
144 | 143 | "react-dom": "^18.2.0", |
145 | 144 | "simple-git-hooks": "^2.8.1", |
146 | 145 | "size-limit": "^8.2.4", |
147 | | - "typescript": "^4.9.5", |
148 | | - "vitest": "^0.31.3" |
| 146 | + "tsup": "^7.0.0", |
| 147 | + "typescript": "^5.1.3", |
| 148 | + "vitest": "^0.32.2" |
149 | 149 | }, |
150 | 150 | "pnpm": { |
151 | 151 | "peerDependencyRules": { |
|
0 commit comments