Skip to content

Commit 78661ca

Browse files
author
Alex Cory
committed
Merge branch 'master' of github.com:alex-cory/react-usefetch
2 parents 9352989 + 193307c commit 78661ca

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "use-http",
33
"version": "1.0.12",
44
"homepage": "https://use-http.com",
5-
"main": "dist/index.js",
5+
"main": "dist/cjs/index.js",
6+
"module": "dist/esm/index.js",
67
"license": "MIT",
78
"repository": {
89
"type": "git",
@@ -53,9 +54,11 @@
5354
"watch": "^1.0.2"
5455
},
5556
"scripts": {
56-
"prepublishOnly": "yarn build:production # runs before publish",
57-
"build": "rm -rf dist && tsc --module CommonJS",
57+
"prepublishOnly": "yarn build:production && yarn build:production:esm # runs before publish",
58+
"build": "rm -rf dist/cjs && tsc --module CommonJS --outDir dist/cjs",
59+
"build:esm": "rm -rf dist/esm && tsc",
5860
"build:production": "yarn build -p tsconfig.production.json",
61+
"build:production:esm": "yarn build:esm -p tsconfig.production.json",
5962
"build:watch": "rm -rf dist && tsc -w --module CommonJS",
6063
"tsc": "tsc -p . --noEmit && tsc -p ./src/__tests__",
6164
"test:browser": "yarn tsc && jest -c ./config/jest.config.js --env=jsdom",

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"moduleResolution": "node",
1717
"noImplicitAny": true,
1818
"noUnusedLocals": true,
19-
"outDir": "dist",
19+
"outDir": "dist/esm",
2020
"sourceMap": true,
2121
"strict": true,
2222
"target": "es5"
2323
},
2424
"include": [
2525
"src/*.ts"
2626
]
27-
}
27+
}

0 commit comments

Comments
 (0)