From eb7da56955dab083b32dfb86302efbf93017ec15 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Wed, 3 May 2023 16:51:48 +0800 Subject: [PATCH] feat: recover cjs entry --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fcd8099..86ac697 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.js" + "import": "./dist/index.js", + "require": "./dist/index.cjs" }, "./client": { "types": "./client.d.ts" @@ -16,7 +17,7 @@ }, "scripts": { "dev": "tsc --watch", - "build": "tsc", + "build": "tsc --module commonjs && mv dist/index.js dist/index.cjs && tsc", "prepare": "npm run build" }, "repository": "pd4d10/vite-plugin-svgr",