Vite is fast. Farm is faster — 10x faster HMR, 5x faster builds. And it's Vite-compatible.
What Is Farm?
Farm is a Rust-based web build tool that's compatible with Vite's plugin ecosystem. It handles compilation, bundling, and dev server — all in Rust for maximum speed.
npm create farm@latest my-app
cd my-app
npm install && npm start
# Dev server at http://localhost:9000
Vite Plugin Compatibility
// farm.config.ts
import { defineConfig } from '@farmfe/core'
import react from '@vitejs/plugin-react' // Vite plugin works!
export default defineConfig({
vitePlugins: [react()],
compilation: {
input: { index: './index.html' },
output: { path: './dist' }
}
})
Most Vite plugins work out of the box. Use your existing @vitejs/plugin-react, @vitejs/plugin-vue, etc.
Performance
| Metric | Vite | Farm | Speedup |
|---|---|---|---|
| Cold start (1000 modules) | 1.5s | 0.3s | 5x |
| HMR update | 50ms | 5ms | 10x |
| Production build | 20s | 4s | 5x |
Key Features
- Incremental compilation — only recompile changed modules
- Persistent cache — second builds are near-instant
- Partial bundling — smart code splitting without configuration
- Tree shaking — built-in, optimized
- CSS Modules, PostCSS, Sass — all built-in
- React, Vue, Svelte, Solid — all supported
Why Farm Over Vite
Vite uses esbuild for dev and Rollup for production — two different tools with different behaviors. Farm uses one Rust-based pipeline for both, so dev and production behave identically.
Building fast web apps? Check out my developer tools or email spinov001@gmail.com.
Top comments (0)