From 726e06fd0d545a0e1076d3dd8cd2cc48b82629a9 Mon Sep 17 00:00:00 2001 From: kevintyj Date: Fri, 24 Nov 2023 20:38:58 +0530 Subject: [PATCH] build: Add target package.json to dist --- dist/package.json | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 dist/package.json 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",