We're excited to announce the 3.0 release of AnalogJS! This release includes many features that help developers ship websites and full-stack applications, faster, with Angular.
Features ⭐️
Analog is the meta-framework built on top of Angular, powered by Vite, a next generation open-source build tool, and Nitro, an open-source server engine framework. Here are some of its features, including:
- First-class support for the Vite ecosystem (Vitest, Playwright, Storybook, and more)
- Filesystem-based routing
- Support for markdown pages and blogs
- Support for API/server routes
- Hybrid SSR/SSG with sitemap and RSS feed support
- Supports Angular CLI/Nx workspaces
- Server and deployment support
- And more!
What's New
Analog 3.0 contains many new features including composable Vite plugins, Nitro v2 and v3 support, type-safe routing, streaming SSR, new Angular compilation support, coding agents, and more.
Composable Vite Plugins 🔌
In previous versions, the analog() plugin set up the Angular and Nitro plugins for you. In Analog 3.x, the Vite plugins are separate but composable for Analog, Angular, and Nitro. Each plugin takes only the options it owns.
import { defineConfig } from 'vite'; import analog from '@analogjs/platform'; import angular from '@analogjs/vite-plugin-angular'; import nitro from '@analogjs/vite-plugin-nitro'; export default defineConfig(() => ({ plugins: [ analog({ prerender: { routes: ['/', '/about'], }, }), angular({ inlineStylesExtension: 'scss', }), nitro({ routeRules: { '/admin/**': { ssr: false } }, }), ], })); This makes it clear where each option is configured, and lets you extend the plugins like any other Vite plugin. The ng update and nx migrate migrations split your existing config for you.
This also allows you to swap out the angular() plugin for the OXC Angular or Angular NGP plugin for compilation, while still using Analog features.
Support for Nitro v2 and Nitro v3 🔥
Analog uses Nitro for API routes and server deployment support. Nitro v2 remains the default through the @analogjs/vite-plugin-nitro package. Analog also adds support for the upcoming release of Nitro v3 as a standard Vite plugin.
To switch to Nitro v3, install the nitro package, and import nitro() from nitro/vite instead:
import analog from '@analogjs/platform'; import angular from '@analogjs/vite-plugin-angular'; import { nitro } from 'nitro/vite'; export default defineConfig(() => ({ plugins: [analog(), angular(), nitro()], })); Analog detects and configures the correct Nitro version being used, so you can continue with the stable release of Nitro v2 and upgrade to Nitro v3 when you're ready.
Bring Your Own Server 🛒
In Analog 3.0, you can serve your Analog app from the server you already run (NestJS, Express, Fastify, Hono, or a plain Node http server) instead of Nitro. Your server owns the process and its routes. Analog handles server-side rendering, page endpoints and server functions inside it.
Point the new server option at your server's entry file:
// vite.config.ts import analog from '@analogjs/platform'; import angular from '@analogjs/vite-plugin-angular'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [ analog({ server: { entry: 'src/server/main.ts' } }), angular(), ], }); Then mount Analog's handler with createAnalogHandler() from @analogjs/router/server, after your own routes:
// src/server/main.ts import { createAnalogHandler } from '@analogjs/router/server'; import express from 'express'; const app = express(); app.get('/api/health', (req, res) => res.json({ ok: true })); app.use(createAnalogHandler()); Fetch-native servers such as Hono use createAnalogRequestHandler(), which takes a Request and returns a Response, or null for requests Analog doesn't handle:
const handleAnalogRequest = createAnalogRequestHandler(); app.all('*', async (c) => (await handleAnalogRequest(c.req.raw)) ?? c.notFound()); Analog serves its own requests and passes everything else on with next(), so your 404 handling still applies. In development, Vite runs your server inside the dev server with HMR, and recreates the app when server code changes. In production, vite build outputs the client and a single server bundle you run with node dist/server/main.js.
NestJS Integration
There's a dedicated guide on using NestJS covering both the Express and Fastify adapters. Mount Analog in onModuleInit and your controllers keep priority. Server functions, page load functionality and SSR run inside the NestJS process too, so they can inject your NestJS services directly:
export const greet = serverFn(v.object({ name: v.string() }), async ({ name }) => injectNest(GreetingService).greet(name), ); Get started with the Custom Server guide and the NestJS integration guide.
Type-safe Routing 🧭
Analog introduces experimental type-safe routing, to further extend the Angular Router. Enable it with the experimental.typedRouting option:
export default defineConfig({ plugins: [ analog({ experimental: { typedRouting: true } }), angular(), nitro() ], }); Analog generates a route table from your pages, and checks paths and parameters in your templates and code.
Use the LinkTo directive in your templates for type-safety:
<a [linkTo]="{ path: '/products/[id]', params: { id: product.id }, query: { tab: 'details' } }" > Details </a> For programmatic navigation or consumption of params, import the appropriate functions.
import { injectNavigate, injectParams } from '@analogjs/router'; const navigate = injectNavigate(); navigate('/products/[id]', { params: { id: 42 } }); const params = injectParams('/products/[id]'); // params().id is a string With strictTemplates enabled, invalid routes and parameters used in the template now surface compilation errors to ensure correctness.
API routes also get validation with defineApiRoute, using any Standard Schema library such as Zod, Valibot, or ArkType:
// src/server/routes/api/users.post.ts import { defineApiRoute } from '@analogjs/router/server/actions'; import { z } from 'zod'; export default defineApiRoute({ body: z.object({ name: z.string().min(1) }), handler: ({ body }) => ({ name: body.name }), }); Invalid requests return a 422 response with the validation issues, without calling the handler.
Supporting the Future of Angular Compilation with Vite ⚙️
Angular has recently introduced a new experimental hybrid preprocessor (NGP) using Rust and OXC, improving compilation performance of Angular applications, and integration with TypeScript 7 type-checking. This also improves support for plugins and integrations to support Angular compilation with different toolchains, including Vite.
Analog supports Angular's experimental hybrid preprocessor, with TypeScript 7 and Angular template type checking enabled by default.
To enable it, use the compilation option in the plugin:
angular({ compilation: 'ngp' }); Using a custom type-checker, such as the Rust-based TypeScript 7 type checker tsrs is also supported.
To enable, install the tsrs package, and set the typeChecker to tsrs:
angular({ compilation: 'ngp', typeChecker: 'tsrs', }); The Analog Vite Plugin for Angular will continue to receive updates as the new Angular compiler architecture matures.
Streaming SSR 🌊
Analog adds experimental streaming server-side rendering. Instead of waiting for the whole page to render, the server sends the document head right away, and sends each @defer (hydrate …) block as soon as it's ready.
Enable it in the Vite config:
export default defineConfig({ plugins: [ analog({ experimental: { streaming: true } }), angular(), nitro(), ], }); And update the render function to renderStream in the main.server.ts:
// src/main.server.ts import { renderStream } from '@analogjs/router/server'; import { config } from './app/app.config.server'; import { AppComponent } from './app/app.component'; export default renderStream(AppComponent, config); Then wrap content in @defer blocks with a hydrate trigger:
<h1>Dashboard</h1> @defer (hydrate on viewport) { <app-recommendations /> } @placeholder { <p>Loading recommendations…</p> } SSR Streaming builds on Angular's incremental hydration. It falls back to buffered rendering for SEO/bot requests automatically. It requires Angular v21 or later.
Vite Plugin Integrations 🧩
Any Vite plugin can now hook into Angular compilation through a new analog.setup hook. Plugins can register component stylesheet preprocessors, control which files Angular compiles, and serve component styles through Vite's CSS pipeline.
For example, Tailwind CSS needs a @reference to your root stylesheet in each component stylesheet that uses @apply. A small Vite plugin can add it for you, and have @tailwindcss/vite process component styles during development:
import type { AnalogIntegrationPlugin } from '@analogjs/vite-plugin-angular'; export function angularTailwind( rootStylesheet: string, ): AnalogIntegrationPlugin { const inject = (code: string) => code.includes('@apply') && !/^\s*@reference\b/m.test(code) ? `@reference "${rootStylesheet}";\n${code}` : code; return { name: 'angular-tailwind', enforce: 'pre', analog: { setup(ctx) { ctx.registerStylePreprocessor(inject); ctx.externalizeComponentStyles(); }, }, }; } You add the plugin to plugins: [...] like any other Vite plugin, with no extra Analog options:
import { resolve } from 'node:path'; import { defineConfig } from 'vite'; import analog from '@analogjs/platform'; import angular from '@analogjs/vite-plugin-angular'; import nitro from '@analogjs/vite-plugin-nitro'; import tailwindcss from '@tailwindcss/vite'; import { angularTailwind } from './tools/angular-tailwind'; export default defineConfig(() => ({ plugins: [ analog(), angular(), nitro(), tailwindcss(), angularTailwind(resolve(import.meta.dirname, 'src/styles.css')), ], })); See the Tailwind CSS guide and the Style Pipeline guide for more details.
AI Coding Agent Support 🤖
Analog ships guidance for AI coding agents with the framework, so the agent follows the conventions for the version you have installed.
-
@analogjs/platformincludes anAGENTS.mdfile covering file-based routing, server and API routes, data fetching, content routes, and the modern Angular style Analog expects. - The same guidance ships as an
analogjsskill in an Agent Plugins v1.0.0 manifest atnode_modules/@analogjs/platform. - New projects from
create-analogand the Nx generators includeAGENTS.mdandCLAUDE.mdfiles that point to the guidance innode_modules, so it stays up to date when you upgrade.
The Analog docs are readily available for agents to read:
-
llms.txtindexes the docs, andllms-full.txtcontains all of them in one file. - Each docs section has its own
llms.txt, such ashttps://analogjs.org/docs/features/llms.txt. - Add
.mdto any docs page URL to get that page as Markdown, or use the Copy page button to paste it into your AI assistant.
See the Build with AI guide for more details.
Vite Ecosystem Upgrades ⚡️
Analog continues to integrate and support many Vite ecosystem integrations:
- Angular v20-v22
- Vite 6.x, 7.x, and 8.x, including Rolldown and OXC
- Vitest 4.x and 5.x
- Nx 21.2+ through Nx 24.x
- Storybook 10.x
- Astro 6.x, 7.x
Upgrading to Analog 3.0 🚀
Analog 3.0 requires Angular v20 or newer. Projects that need to stay on Angular v17-v19 can stay on Analog 2.x.
To upgrade, run the update command for your workspace:
ng update @analogjs/platform@latest nx migrate @analogjs/platform@latest The migrations handle the Vite config changes. For the full list of breaking changes, including removed APIs and new defaults, see the migration guide. The guide also includes a prompt you can give to an AI coding agent to run the migration for you.
Contributions and Community 🤓
AnalogJS would not be where it is without a team of core contributors and collaborators. Also thanks to the nearly 200 contributors to the project, whether through code, documentation, tests, or even just trying out the project.
The project has reached over 2 million monthly downloads on NPM, 3000 stars on GitHub, 1000+ members on Discord, 1000+ followers on Twitter/X.
Partner with Analog 🤝
Continued development of Analog would not be possible without our partners and community. Thanks to our official deployment partner Zerops, longtime supporters Snyder Technologies, Nx, new sponsor CodeRabbit, and many other backers of the project.
Find out more information on our partnership opportunities or reach out directly to partnerships[at]analogjs.org.
Join the Community 🥇
- Visit and Star the GitHub Repo
- Join the Discord
- Follow us on Twitter
If you enjoyed this post, click the ❤️ so other people will see it. Follow AnalogJS and me on Twitter/X, and subscribe to my YouTube Channel for more content!
