API Stability Notice

Macroforge is under active development. The API is not yet stable and may change between versions. Some documentation sections may be outdated.

Integration

Macroforge integrates with your development workflow through IDE plugins and build tool integration.

Overview

IntegrationPurposePackage
TypeScript PluginIDE support (errors, completions)@macroforge/typescript-plugin
Vite PluginBuild-time macro expansion@macroforge/vite-plugin

For the best development experience, use both integrations:

  1. TypeScript Plugin: Provides real-time feedback in your IDE
  2. Vite Plugin: Expands macros during development and production builds
Bash
# Install both plugins
npm install -D @macroforge/typescript-plugin @macroforge/vite-plugin

How They Work Together

Your Code
TypeScript with @derive decorators
TypeScript Plugin
Language service integration
IDE Feedback
Errors & completions
Vite Plugin
Build-time transformation
Dev Server
Hot reload
Production Build
Optimized output

Detailed Guides