Closed jantimon closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
yacijs | ✅ Ready (Inspect) | Visit Preview | Apr 15, 2024 0:35am |
Comparing tree-shaking
(4115a70) with main
(3240e35)
✅ 2
untouched benchmarks
What would happen if we have the following case:
import { css } from "next-yak";
let globalCounter = 0;
const headline = css\`
color: red;
\${globalCounter++ && css\`
color: blue;
\`}
\`;
This would result in something like this:
import { css } from "next-yak";
let globalCounter = 0;
const headline =
/*YAK Extracted CSS:
...some css*/
/*#__PURE__*/
css(__styleYak.headline, globalCounter++ && css(__styleYak.headline__headline));
Pure
wouldn't mean pure here 😄
add
/*#__PURE__ */
to hidehttps://play.swc.rs/?version=1.3.100&code=H4sIAAAAAAAAA0vOzysuUUhUsFXQ11JIrFDQ0tfXUo6PDwgNco2PB%2FMgohUamtZcyWDFqWDFyIoqEZLJQMkqEJerPDMvJb9cLzs1tQAolmoNALpqo%2BRqAAAA&config=H4sIAAAAAAAAA02NSw7DIAxE95wCed1F21XVO%2FQQiDoRFT9hRyqKuHuAkLQ7zxvPzCqkhA9peMq1nlVElQjTqSuh7Fl9KwHOEUknExkuh8vUrElZwo7K7gCrNCO3FNL9enuMBNgQCI%2FEYM54M%2BX%2FTR1cTEjUWDm3nPKzxc72LTH2fg2clt4Khl7hvfTvxkTZAFqflY3rAAAA