|
2 | 2 | "name": "unfetch", |
3 | 3 | "version": "4.2.0", |
4 | 4 | "description": "Bare minimum fetch polyfill in 500 bytes", |
5 | | - "unpkg": "polyfill/index.js", |
6 | | - "main": "dist/unfetch.js", |
7 | | - "module": "dist/unfetch.module.js", |
8 | | - "jsnext:main": "dist/unfetch.module.js", |
9 | | - "umd:main": "dist/unfetch.umd.js", |
| 5 | + "unpkg": "./polyfill/index.js", |
| 6 | + "main": "./dist/unfetch.js", |
| 7 | + "module": "./dist/unfetch.mjs", |
| 8 | + "jsnext:main": "./dist/unfetch.mjs", |
| 9 | + "umd:main": "./dist/unfetch.umd.js", |
10 | 10 | "scripts": { |
11 | 11 | "test": "eslint && jest", |
12 | | - "build": "microbundle src/index.mjs && microbundle -f cjs polyfill/polyfill.mjs -o polyfill/index.js --no-sourcemap && cp dist/unfetch.module.js dist/unfetch.es.js", |
| 12 | + "build": "microbundle src/index.mjs -f cjs,esm,umd && microbundle polyfill/polyfill.mjs -o polyfill/index.js -f cjs --no-sourcemap && cp dist/unfetch.module.js dist/unfetch.es.js", |
13 | 13 | "prepare": "npm run -s build", |
14 | 14 | "release": "cross-var npm run build -s && cross-var git commit -am $npm_package_version && cross-var git tag $npm_package_version && git push && git push --tags && npm publish" |
15 | 15 | }, |
| 16 | + "exports": { |
| 17 | + ".": { |
| 18 | + "import": "./index.mjs", |
| 19 | + "default": "./index.js" |
| 20 | + }, |
| 21 | + "./polyfill": { |
| 22 | + "default": "./polyfill/index.js" |
| 23 | + }, |
| 24 | + "./package.json": "./package.json", |
| 25 | + "./*": "./*" |
| 26 | + }, |
16 | 27 | "workspaces": [ |
17 | 28 | "./packages/isomorphic-unfetch" |
18 | 29 | ], |
|
0 commit comments