diff --git a/dist/package.json b/dist/package.json new file mode 100644 index 0000000..b731bd6 --- /dev/null +++ b/dist/package.json @@ -0,0 +1 @@ +{"type": "commonjs"} diff --git a/package.json b/package.json index 73e2747..b2ac2c3 100644 --- a/package.json +++ b/package.json @@ -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",