Skip to content

Commit

Permalink
perf(vite-plugin-angular): speed up tests by reusing compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
yjaaidi committed Nov 18, 2024
1 parent 1cb79e0 commit dae5c6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite-plugin-angular/src/lib/angular-vite-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ export function angular(options?: PluginOptions): Plugin[] {

return {
name: '@analogjs/vite-plugin-angular',
async watchChange() {
await buildAndAnalyze();
},
async config(config, { command }) {
watchMode = command === 'serve';
isProd =
Expand Down Expand Up @@ -320,7 +323,6 @@ export function angular(options?: PluginOptions): Plugin[] {
const tsMod = viteServer?.moduleGraph.getModuleById(id);
if (tsMod) {
sourceFileCache.invalidate([id]);
await buildAndAnalyze();
}
}

Expand Down

0 comments on commit dae5c6f

Please sign in to comment.