From 118ec15701e76bc0e9b7d2f161afe54575c93ccf Mon Sep 17 00:00:00 2001 From: zakher Date: Fri, 26 Jul 2024 01:37:53 +0300 Subject: [PATCH] fix: make react-day-picker as external during build --- packages/components/package.json | 2 +- packages/components/tsup.config.js | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index c9edae2c..76ad4b08 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@sikka/hawa", - "version": "0.42.13", + "version": "0.42.14", "description": "Modern UI Kit made with Tailwind", "author": { "name": "Sikka Software", diff --git a/packages/components/tsup.config.js b/packages/components/tsup.config.js index ef40ea11..56770a2f 100644 --- a/packages/components/tsup.config.js +++ b/packages/components/tsup.config.js @@ -38,17 +38,22 @@ function createConfigForGroup(entries, name) { banner: { js: '"use client";' }, entry: entries, tsconfig: "./tsconfig.json", - external: ["react", "react-dom", "@radix-ui/react-toast"] + external: [ + "react", + "react-dom", + "@radix-ui/react-toast", + "react-day-picker", + ], }); } const groupedElementEntries = chunkEntries(elementEntries, 3); const groupedLayoutEntries = chunkEntries(layoutEntries, 3); const groupedElements = groupedElementEntries.map((group, i) => - createConfigForGroup(group, `Build Elements Group - ${i}`) + createConfigForGroup(group, `Build Elements Group - ${i}`), ); const groupedLayout = groupedLayoutEntries.map((group, i) => - createConfigForGroup(group, `Build Layout Group - ${i}`) + createConfigForGroup(group, `Build Layout Group - ${i}`), ); const buildAllConfig = defineConfig({ @@ -58,7 +63,7 @@ const buildAllConfig = defineConfig({ target: "es2019", entry: { index: "index.ts" }, format: ["cjs", "esm"], - banner: { js: '"use client";' } + banner: { js: '"use client";' }, }); const buildCoreConfig = defineConfig({ name: "Build Core", @@ -73,8 +78,8 @@ const buildCoreConfig = defineConfig({ "hooks/index": "hooks/index.ts", "blocks/index": "blocks/index.ts", "layout/index": "layout/index.ts", - "elements/index": "elements/index.ts" - } + "elements/index": "elements/index.ts", + }, }); const buildBlocksConfig = defineConfig({ name: "Build Blocks", @@ -88,13 +93,13 @@ const buildBlocksConfig = defineConfig({ "blocks/misc/index": "blocks/misc/index.ts", "blocks/auth/index": "blocks/auth/index.ts", "blocks/pricing/index": "blocks/pricing/index.ts", - "blocks/feedback/index": "blocks/feedback/index.ts" - } + "blocks/feedback/index": "blocks/feedback/index.ts", + }, }); module.exports = { groupedElements, groupedLayout, buildAllConfig, buildCoreConfig, - buildBlocksConfig + buildBlocksConfig, };