How to create a tree-shakeable component library with Panda CSS? #2146
Unanswered
trystendsmyth
asked this question in
Q&A
Replies: 1 comment 6 replies
-
It would be great to see an actual reproduction; a GitHub or Stackblitz will do. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Panda works fantastically in execution my component library. The problem arises when I want to export it with my custom preset. I've tried using
tsup
androllup
, but both builders have the same problem when I try to tree-shake the resultingdist
folder. In both cases I get the following error (where bracketed values are reals paths):My tsconfig is as follows:
And my Panda config looks like this:
An example of my
tsup.config.ts
:Link to Reproduction
can provide more if needed
Steps to reproduce
import { css } from '@styled/css';
tsup
orrollup
, etc.dist
result.JS Framework
React
Panda CSS Version
0.27.3
Browser
No response
Operating System
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions