Skip to content

Commit 2ab4b3e

Browse files
committed
1 parent 0c60943 commit 2ab4b3e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"fetch",
1111
"fetch-api"
1212
],
13-
"main": "dist/index.js",
13+
"main": "dist/index.cjs",
14+
"module": "dist/index.js",
1415
"types": "dist/index.d.ts",
1516
"files": [
1617
"dist/"
@@ -19,9 +20,10 @@
1920
"scripts": {
2021
"clean": "rm -rf dist coverage",
2122
"clean:all": "npm run clean && rm -rf node_modules package-lock.json",
22-
"build": "npm run clean && npm run build:dts && npm run build:cjs && npm run build:umd",
23+
"build": "npm run clean && npm run build:dts && npm run build:esm && npm run build:cjs && npm run build:umd",
2324
"build:dts": "tsc --project tsconfig.dist.json --declaration --emitDeclarationOnly --removeComments false --outDir dist",
24-
"build:cjs": "rollup src/index.ts --format cjs --plugin '@rollup/plugin-typescript={tsconfig: `tsconfig.dist.json`}' --file dist/index.js",
25+
"build:esm": "tsc --project tsconfig.dist.json --outDir dist",
26+
"build:cjs": "rollup src/index.ts --format cjs --plugin '@rollup/plugin-typescript={tsconfig: `tsconfig.dist.json`}' --file dist/index.cjs",
2527
"build:umd": "rollup src/index.ts --format umd --plugin '@rollup/plugin-typescript={tsconfig: `tsconfig.dist.json`}' --name Http --file dist/index.umd.js",
2628
"npm:install:examples": "npm run npm:install:example:web && npm run npm:install:example:node",
2729
"npm:install:example:web": "cd examples/web && npm install",

0 commit comments

Comments
 (0)