|  | 
| 2 | 2 |   "name": "@wojtekmaj/react-async-button", | 
| 3 | 3 |   "version": "1.4.0", | 
| 4 | 4 |   "description": "A button that handles Promises for your React app.", | 
| 5 |  | -  "main": "dist/cjs/index.js", | 
| 6 |  | -  "module": "dist/esm/index.js", | 
| 7 |  | -  "source": "src/index.ts", | 
| 8 |  | -  "types": "dist/cjs/index.d.ts", | 
|  | 5 | +  "type": "module", | 
|  | 6 | +  "sideEffects": false, | 
|  | 7 | +  "main": "./dist/cjs/index.js", | 
|  | 8 | +  "module": "./dist/esm/index.js", | 
|  | 9 | +  "source": "./src/index.ts", | 
|  | 10 | +  "types": "./dist/cjs/index.d.ts", | 
|  | 11 | +  "exports": { | 
|  | 12 | +    ".": { | 
|  | 13 | +      "import": "./dist/esm/index.js", | 
|  | 14 | +      "require": "./dist/cjs/index.js" | 
|  | 15 | +    }, | 
|  | 16 | +    "./src": "./src/index.ts" | 
|  | 17 | +  }, | 
| 9 | 18 |   "scripts": { | 
| 10 |  | -    "build": "yarn build-esm && yarn build-cjs", | 
|  | 19 | +    "build": "yarn build-esm && yarn build-cjs && yarn build-cjs-package", | 
| 11 | 20 |     "build-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext", | 
| 12 | 21 |     "build-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs", | 
|  | 22 | +    "build-cjs-package": "echo '{\n  \"type\": \"commonjs\"\n}' > dist/cjs/package.json", | 
| 13 | 23 |     "clean": "rimraf dist", | 
| 14 | 24 |     "lint": "eslint . --ext .js,.jsx,.ts,.tsx", | 
| 15 | 25 |     "postinstall": "husky install", | 
|  | 
| 18 | 28 |     "test": "yarn lint && yarn tsc && yarn prettier && yarn unit", | 
| 19 | 29 |     "tsc": "tsc --noEmit", | 
| 20 | 30 |     "unit": "vitest", | 
| 21 |  | -    "watch": "yarn build-esm --watch & yarn build-cjs --watch" | 
|  | 31 | +    "watch": "yarn build-esm --watch & yarn build-cjs --watch & yarn build-cjs-package" | 
| 22 | 32 |   }, | 
| 23 | 33 |   "keywords": [ | 
| 24 | 34 |     "react", | 
|  | 
0 commit comments