-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vite-plugin-angular): update plugin to ignore tsx files #102
Conversation
Thanks @himyjan. Let's keep this PR focused on fixing the bug. The package.json and other updates should be in a separate PR. |
@@ -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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the question mark also
if (/\.[cm]?ts?$/.test(ctx.file)) { | |
if (/\.[cm]?ts$/.test(ctx.file)) { |
@@ -173,7 +173,7 @@ export function angular(options?: PluginOptions): Plugin[] { | |||
return; | |||
} | |||
|
|||
if (/\.[cm]?tsx?$/.test(id)) { | |||
if (/\.[cm]?ts?$/.test(id)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
if (/\.[cm]?ts?$/.test(id)) { | |
if (/\.[cm]?ts$/.test(id)) { |
change line 125 176 from tsx to ts, set plugin not try to compile tsx file. #100 (comment) Update angular-vite-plugin.ts
Thanks @himyjan! @allcontributors add @himyjan for code |
I've put up a pull request to add @himyjan! 🎉 |
change line 125 176 from tsx to ts, set plugin not try to compile tsx file. #100 (comment)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
Issue Number: #100
What is the new behavior?
1.fix #100 only comple .ts file
Does this PR introduce a breaking change?
Other information