aero() Vite plugin. For larger projects, you can move Aero options into a dedicated aero.config.ts.
The Vite plugin
Addaero() to vite.config.ts:
vite.config.ts
Plugin options
vite.config.ts
Dedicated aero.config.ts
For projects with more complex configuration, use@aero-js/core/config to keep Aero options separate from Vite:
aero.config.ts
vite.config.ts
createViteConfig() with no arguments auto-loads aero.config.ts from the project root.
Env-aware config
Pass a function todefineConfig() to vary options by mode:
aero.config.ts
Path aliases
Aero injects default path aliases so imports work withouttsconfig.json configuration:
tsconfig.json under compilerOptions.paths. They merge with the defaults.
Environment variables
Aero uses Vite’s environment variable system. Variables in.env files are available in build scripts by default. Prefix with VITE_ to expose them to client scripts:
.env
.env, .env.local, .env.[mode], and .env.[mode].local in order. Shell variables override file values.
Reactivity and hypermedia
Optional client features behind feature flags (both defaultfalse):
busy and post-swap binding processing require both flags.
See Reactivity and Hypermedia to enable and use them. HTMX and Alpine.js work without these flags.