From b24d9b2ba2c848c658bab4f555a4a0af4aa545ac Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Tue, 20 Jun 2023 11:36:28 +0200 Subject: [PATCH] fix: improve bundle output --- package.json | 2 +- tsup.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 04507296..3a8464fb 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "prebuild": "rm -rf dist lib", "build": "run-s build:*", "build:bundle": "tsup src/index.tsx", - "build:legacy": "tsup src/index.tsx --format esm --legacy-output --no-clean", + "build:legacy": "tsup src/index.tsx --format esm --legacy-output --no-clean --no-dts --target es2020", "build:utils": "tsc -p tsconfig.test.json", "build:copy": "node scripts/build-copy.js", "postbuild": "size-limit", diff --git a/tsup.config.ts b/tsup.config.ts index 88c15499..d27967da 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ sourcemap: true, dts: true, clean: true, - target: 'es2020', + target: 'esnext', external: ['react'], format: ['esm', 'cjs'], });