Skip to content

Commit

Permalink
Bundle Backfill for Panda components (#8)
Browse files Browse the repository at this point in the history
* build: properly set up library to have injected cascade layers and backfill of panda components, add use client directive banner

* ci(changesets): add changesets for Button component and backfill for panda components
  • Loading branch information
hobbescodes authored Oct 16, 2023
1 parent cc270a4 commit b10cb87
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eleven-fishes-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hobbescodes/tigris-ui": minor
---

Add backfill for panda components
5 changes: 5 additions & 0 deletions .changeset/violet-seas-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hobbescodes/tigris-ui": minor
---

Add `Button` component
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
"use client";

// inject root cascade layers
import "lib/styles/main.css";

// 🐼 export backfill of Panda components
export * from "generated/panda/css";
export * from "generated/panda/jsx";
export type { JsxStyleProps } from "generated/panda/types";

export * from "components";
3 changes: 2 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const tsupConfig = defineTsupConfig({
entry: {
ui: "src/index.ts",
},
treeshake: true,
// TODO enable Rollup tree-shaking, temporarily disabled to allow properly injecting `use client` directive banner (Rollup tree-shaking removes it); track https://github.com/egoist/tsup/issues/835
// treeshake: true,
sourcemap: true,
minify: true,
clean: true,
Expand Down

0 comments on commit b10cb87

Please sign in to comment.