Skip to content

Commit 9005798

Browse files
authored
Merge pull request #10 from github/default-type-cjs
Add `type: commonjs` package.json to cjs output
2 parents 5954aa1 + f8f6a34 commit 9005798

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"prebuild": "npm run clean && npm run lint && mkdir dist",
3535
"build": "npm run build:esm && npm run build:cjs",
3636
"build:esm": "tsc",
37-
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
37+
"build:cjs": "tsc --module commonjs --outDir dist/cjs && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json",
3838
"clean": "rm -rf dist",
3939
"lint": "eslint --report-unused-disable-directives . --color --ext .js,.ts,.tsx && tsc --noEmit",
4040
"prepublishOnly": "npm run build",

0 commit comments

Comments
 (0)