Skip to content

Commit

Permalink
perf(vite-plugin-angular): speed up tests by reusing compiler (#1444)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Roberts <robertsbt@gmail.com>
  • Loading branch information
yjaaidi and brandonroberts authored Nov 19, 2024
1 parent 6458705 commit a7f4587
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,11 @@ export function angular(options?: PluginOptions): Plugin[] {

return {
name: '@analogjs/vite-plugin-angular',
async watchChange() {
if (isTest) {
await buildAndAnalyze();
}
},
async config(config, { command }) {
watchMode = command === 'serve';
isProd =
Expand Down Expand Up @@ -320,7 +325,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 a7f4587

Please sign in to comment.