Skip to content

Commit

Permalink
fix: make react-day-picker as external during build
Browse files Browse the repository at this point in the history
  • Loading branch information
zaaakher committed Jul 25, 2024
1 parent abc3b14 commit 118ec15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
23 changes: 14 additions & 9 deletions packages/components/tsup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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,
};

0 comments on commit 118ec15

Please sign in to comment.