Skip to content

Commit

Permalink
fix(vite-plugin-angular): force rebuild and analysis on file changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Oct 24, 2024
1 parent 43bf946 commit e968744
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,14 @@ export function angular(options?: PluginOptions): Plugin[] {
},
configureServer(server) {
viteServer = server;
server.watcher.on('add', () => setupCompilation(resolvedConfig));
server.watcher.on('unlink', () => setupCompilation(resolvedConfig));
server.watcher.on('add', async () => {
setupCompilation(resolvedConfig);
await buildAndAnalyze();
});
server.watcher.on('unlink', async () => {
setupCompilation(resolvedConfig);
await buildAndAnalyze();
});
},
async buildStart() {
setupCompilation(resolvedConfig);
Expand Down

0 comments on commit e968744

Please sign in to comment.