-
DescriptionHello there, the component library ships bulid-info as well as preset theme. The issue is, since the It's disappointing! is there a way to improve treeshaking/purge code for recipes? You can find the component library and app code below. Component Library Codehttps://stackblitz.com/edit/vitejs-vite-7ytyb4 App Codehttps://stackblitz.com/edit/vitejs-vite-1aznev Link to Reproductionhttps://stackblitz.com/edit/vitejs-vite-1aznev Steps to reproduceTo reproduce the bundle analysis above:
JS FrameworkReact (TS) Panda CSS Version^0.17.5 BrowserNo response Operating System
Additional InformationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
by looking at your screenshot, it seems you have bigger issues than the size of the button.. 😅 that being said, do you have an alternative in mind that would solve this ? and would you be willing to work on it ? I noticed you have.. 98 compoundVariants (
finally, if you use a meta-framework like Astro or Next (with RSC), the JS runtime will just disappear by default (due to being SSR'd unless explicitly opt-in to client rendering) |
Beta Was this translation helpful? Give feedback.
by looking at your screenshot, it seems you have bigger issues than the size of the button.. 😅
also, I'm guessing you're looking at the size of the file unminified + uncompressed
that being said, do you have an alternative in mind that would solve this ? and would you be willing to work on it ?
I noticed you have.. 98 compoundVariants (
console.log(buttonRecipe.compoundVariants.length)
), what's happening here ? maybe you can find a way to reduce that number ?instead of generating X compoundVariants for each color and just swapping the color used like here
css: { border: '1.5px solid token(colors.neutral)' }
you could for example just use a CSS variable and apply that variable in thecolor