Skip to content

Kudzu 0.7.5 - Class composition migration

Choose a tag to compare

@bunzzeok bunzzeok released this 01 Aug 12:19
· 61 commits to main since this release

Kudzu 0.7.5 lets ordinary React source retain common direct clsx calls while compiling them to existing static and reactive class paths.

New in 0.7.5

  • Default and named clsx imports lower at build time for string and number literals, literal arrays, literal object conditions, and conditional expressions.
  • Dynamic object conditions reuse existing reactive class bindings without serializing or shipping the clsx function.
  • Static uses add no browser JavaScript, and the package import is erased from compiled modules.
  • Mixed React imports such as import { useState, type ReactNode } from "react" now erase type-only specifiers before runtime module rewriting.
  • The React/Vite fixture verifies initial class output, state-driven class updates in Chrome, package erasure, and mixed type imports.

Boundary

clsx spreads, computed object keys, arbitrary calls, and indirect references remain unsupported. This is source lowering for a proven migration pattern, not package execution or a general React ecosystem runtime.

Upgrade

npm install @kudzujs/core@^0.7.5