vite-plugin-angular

raw JSON →
0.0.0 verified Mon Apr 27 auth: no javascript

A Vite plugin for integrating Angular into Vite-based projects. This package provides a bridge between the Vite build tool and Angular's compilation pipeline, enabling faster development with Hot Module Replacement (HMR) for Angular applications. The current version is 0.0.0, which is an early release with limited stability. It differentiates from Angular CLI by offering Vite's speed and flexibility, but lacks mature documentation and may have breaking changes. Release cadence is irregular due to its alpha stage.

error Error: The plugin 'vite-plugin-angular' has no exported member 'angular'. Did you mean to use default import?
cause Using named import instead of default import.
fix
Use: import angular from 'vite-plugin-angular'
error Error: Cannot find module 'vite-plugin-angular'
cause Package not installed or Vite not properly configured.
fix
Run: npm install vite-plugin-angular --save-dev
error TypeError: angular is not a function
cause Calling the imported module without invoking it as a function.
fix
Use: plugins: [angular()] (with parentheses)
breaking The API is unstable and may change without notice. Version 0.0.0 indicates no stable release.
fix Pin to a specific commit or wait for a stable release.
gotcha This plugin is not maintained by the Angular team and may not work with all Angular versions.
fix Check compatibility with your Angular version; consider using @angular/build or analog for production.
gotcha No README or documentation available; usage relies on source code inspection.
fix Refer to GitHub repository source code or examples.
npm install vite-plugin-angular
yarn add vite-plugin-angular
pnpm add vite-plugin-angular

Basic setup of vite-plugin-angular in a Vite config file. It shows how to import and use the plugin as a Vite plugin.

// vite.config.ts
import { defineConfig } from 'vite';
import angular from 'vite-plugin-angular';

export default defineConfig({
  plugins: [angular()],
});