this repo was inlined in Panda CSS (here in this PR) and will therefore no longer be maintained, code now living in the current @pandacss/extractor package
Static code extraction. Zero-runtime CSS-in-TS <Box />
Optimize your code and elevate your developer experience with compile-time optimizations from static analysis.
💎 Enhanced DX close to Chakra-UI's <Box />
without the runtime cost
✂️ Smaller CSS/JS output (up to 99%) with compile-time purge just like Tailwind CSS
🎯 Over 180k props/values/conditions combinations, only 1 used in your app, only 1 will remain
🔍 Smart analyzer built-in for near instant drop-in benefits
💾 Low-level AST output with access to ts-morph
Node
objects for fine-grained control
if you need the static analysis (using ts-morph on components props/functions args:
pnpm add @box-extractor/core
or you could try it like this:
pnpx @box-extractor/cli -i path/to/input.ts -o path/to/report.json --functions="css,styled" --components="div,factory.*,SomeComponent"