Skip to content

Commit

Permalink
build: Add target package.json to dist
Browse files Browse the repository at this point in the history
  • Loading branch information
kevintyj committed Nov 24, 2023
1 parent 77cc9d5 commit 726e06f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "commonjs"}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"prepare": "husky install",
"watch": "tsup --watch",
"json:pre": "json -I -f package.json -e 'this.type = \"commonjs\"'",
"json:post": "json -I -f package.json -e 'this.type = \"module\"'",
"json:post": "json -I -f package.json -e 'this.type = \"module\"' && echo '{\"type\": \"commonjs\"}' > dist/package.json",
"prebuild": "pnpm run clean:build && pnpm run json:pre",
"build": "pnpm run prebuild && tsc && ncc build lib/index.js -o dist && pnpm run postbuild",
"postbuild": "pnpm run json:post",
Expand Down

0 comments on commit 726e06f

Please sign in to comment.