|
10 | 10 | "type": "github", |
11 | 11 | "url": "https://github.com/sponsors/tannerlinsley" |
12 | 12 | }, |
13 | | - "main": "index.js", |
| 13 | + "main": "lib/index.js", |
| 14 | + "unpkg": "dist/react-query.development.js", |
14 | 15 | "types": "types/index.d.ts", |
15 | | - "module": "dist/react-query.mjs", |
| 16 | + "module": "es/index.js", |
16 | 17 | "sideEffects": false, |
17 | 18 | "scripts": { |
18 | 19 | "test": "is-ci \"test:ci\" \"test:dev\"", |
|
21 | 22 | "test:coverage": "yarn test:ci; open coverage/lcov-report/index.html", |
22 | 23 | "test:types": "tsc", |
23 | 24 | "test:eslint": "eslint --ext .ts,.tsx ./src", |
24 | | - "build": "NODE_ENV=production rollup -c && rollup-plugin-visualizer stats-react.json stats-hydration.json", |
25 | | - "build:types": "tsc --project ./tsconfig.types.json && replace 'import type' 'import' ./types -r && replace 'export type' 'export' ./types -r", |
| 25 | + "build": "yarn build:commonjs && yarn build:es && yarn build:umd", |
| 26 | + "build:commonjs": "rm -rf ./lib && BABEL_ENV=commonjs babel --extensions .ts,.tsx --ignore ./src/**/*.test.tsx ./src --out-dir lib", |
| 27 | + "build:es": "rm -rf ./es && babel --extensions .ts,.tsx --ignore ./src/**/*.test.tsx ./src --out-dir es", |
| 28 | + "build:umd": "rm -rf ./dist && NODE_ENV=production rollup -c && rollup-plugin-visualizer stats-react.json stats-hydration.json", |
| 29 | + "build:types": "rm -rf ./types && tsc --project ./tsconfig.types.json && replace 'import type' 'import' ./types -r && replace 'export type' 'export' ./types -r", |
26 | 30 | "now-build": "yarn && cd www && yarn && yarn build", |
27 | 31 | "start": "rollup -c -w", |
28 | 32 | "format": "prettier {.,src,src/**,example/src,example/src/**,types}/*.{md,js,jsx,tsx,json} --write", |
|
40 | 44 | }, |
41 | 45 | "files": [ |
42 | 46 | "dist", |
| 47 | + "lib", |
| 48 | + "es", |
43 | 49 | "types", |
44 | 50 | "scripts", |
45 | 51 | "hydration.js", |
46 | 52 | "hydration.d.ts" |
47 | 53 | ], |
48 | | - "dependencies": {}, |
| 54 | + "dependencies": { |
| 55 | + "@babel/runtime": "^7.5.5" |
| 56 | + }, |
49 | 57 | "peerDependencies": { |
50 | 58 | "react": "^16.8.0" |
51 | 59 | }, |
| 60 | + "peerDependenciesMeta": { |
| 61 | + "react-dom": { |
| 62 | + "optional": true |
| 63 | + }, |
| 64 | + "react-native": { |
| 65 | + "optional": true |
| 66 | + } |
| 67 | + }, |
52 | 68 | "devDependencies": { |
53 | | - "@babel/core": "^7.10.2", |
54 | | - "@babel/preset-env": "^7.10.2", |
55 | | - "@babel/preset-react": "^7.10.1", |
| 69 | + "@babel/cli": "^7.11.6", |
| 70 | + "@babel/core": "^7.11.6", |
| 71 | + "@babel/plugin-transform-runtime": "^7.11.5", |
| 72 | + "@babel/preset-env": "^7.11.5", |
| 73 | + "@babel/preset-react": "^7.10.4", |
56 | 74 | "@babel/preset-typescript": "^7.10.4", |
57 | 75 | "@rollup/plugin-replace": "^2.3.3", |
58 | 76 | "@svgr/rollup": "^5.4.0", |
|
0 commit comments