Skip to content

Commit

Permalink
fix(vite-plugin-angular): update plugin to ignore tsx files (#102)
Browse files Browse the repository at this point in the history
Closes #100
  • Loading branch information
himyjan committed Oct 12, 2022
1 parent 5a2ec8c commit 8bf9854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 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 @@ -122,7 +122,7 @@ export function angular(options?: PluginOptions): Plugin[] {
await buildAndAnalyze();
},
async handleHotUpdate(ctx) {
if (/\.[cm]?tsx?$/.test(ctx.file)) {
if (/\.[cm]?ts$/.test(ctx.file)) {
sourceFileCache.invalidate(ctx.file);
await buildAndAnalyze();
}
Expand Down Expand Up @@ -173,7 +173,7 @@ export function angular(options?: PluginOptions): Plugin[] {
return;
}

if (/\.[cm]?tsx?$/.test(id)) {
if (/\.[cm]?ts$/.test(id)) {
/**
* Re-analyze on each transform
* for test(Vitest)
Expand Down

0 comments on commit 8bf9854

Please sign in to comment.