Skip to main content

3 posts tagged with "features"

View All Tags

Native Macro Transform for Vite

· 3 min read
Andrii Bodnar
Engineering Manager

Lingui macros have always needed a compiler plugin: Babel or SWC turns t`Hello` and <Trans> into runtime calls at build time. In Vite that meant wiring the macro plugin into whichever compiler your framework plugin uses. The new native macro transform removes that step. One option in vite.config.ts, and @lingui/vite-plugin transforms macros itself.

social-card image

Introducing Context Directives

· 3 min read
Andrii Bodnar
Engineering Manager

One of Lingui's biggest ergonomic wins is keyless translations - you write the source string directly in your code and Lingui generates a stable ID for you. But that convenience quietly breaks down the moment you need context to prevent collisions across files. Suddenly you're writing context: "checkout" on every macro call in every file, which defeats the whole point.

social-card image