vite-plugin-angular
vite-plugin-angular copied to clipboard
Vite plugin for Angular, using esbuild and SWC
Vite plugin for Angular.
npm init @nitedani/vite-angular-app
Features:
- Fast live-reload, both in browser(vite) and server code(vavite)
- Easy SSR(optional) using Vike
- Optionally, in development mode, it uses SWC and the Angular JIT compiler in the browser to keep it fast.
- In build mode, it uses the Angular AOT compiler to produce small bundles.
Examples without SSR:
- Simple
- Angular routing module
- Angular Material
Examples with SSR:
- Express SSR
- NestJS SSR
- Vike + NestJS
- Vike + Express
- Vike + Express + Telefunc
| Related packages | Included in @nitedani/vite-plugin-angular |
|---|---|
| @nitedani/angular-renderer-core | ✓ |
| @nitedani/angular-renderer-express | X |
| @nitedani/angular-renderer-nestjs | X |
| @nitedani/vite-plugin-ssr-adapter-express | X |
| @nitedani/vite-plugin-ssr-adapter-nestjs | X |
Usage:
// vite.config.ts
import { defineConfig } from "vite";
import { angular } from "@nitedani/vite-plugin-angular/plugin";
export default defineConfig({
plugins: [angular()],
});