From 08872765ec48a93de13f91cd05a945c2bd267175 Mon Sep 17 00:00:00 2001 From: arvinxx Date: Wed, 6 Sep 2023 22:57:25 +0800 Subject: [PATCH] :bug: fix: try to fix build --- .fatherrc.ts | 4 ++-- client.d.ts | 1 + client.js | 1 + package.json | 33 +++++++-------------------------- src/react.ts | 1 - 5 files changed, 11 insertions(+), 29 deletions(-) create mode 100644 client.d.ts create mode 100644 client.js delete mode 100644 src/react.ts diff --git a/.fatherrc.ts b/.fatherrc.ts index eabaa86..b90b723 100644 --- a/.fatherrc.ts +++ b/.fatherrc.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'father'; export default defineConfig({ - esm: {}, - cjs: {}, + esm: { output: 'es' }, + cjs: { output: 'lib' }, }); diff --git a/client.d.ts b/client.d.ts new file mode 100644 index 0000000..78a52fe --- /dev/null +++ b/client.d.ts @@ -0,0 +1 @@ +export * from './es/react'; diff --git a/client.js b/client.js new file mode 100644 index 0000000..78a52fe --- /dev/null +++ b/client.js @@ -0,0 +1 @@ +export * from './es/react'; diff --git a/package.json b/package.json index d8968b0..4d74ea4 100644 --- a/package.json +++ b/package.json @@ -21,33 +21,14 @@ "license": "MIT", "author": "LobeHub ", "sideEffects": false, - "exports": { - "./package.json": "./package.json", - ".": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js", - "types": "./dist/cjs/index.d.ts" - }, - "./react": { - "types": "./dist/cjs/react.d.ts", - "require": "./dist/cjs/react.js", - "import": "./dist/esm/react.js" - }, - "./*": [ - "./*", - "./*.d.ts" - ] - }, - "typesVersions": { - "*": { - "*": [ - "./*", - "./dist/*" - ] - } - }, + "main": "./lib/index.js", + "module": "./es/index.js", + "types": "./lib/index.d.ts", "files": [ - "dist" + "lib", + "es", + "client.d.ts", + "client.js" ], "scripts": { "build": "father build", diff --git a/src/react.ts b/src/react.ts deleted file mode 100644 index f97dcae..0000000 --- a/src/react.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './react/index';