Skip to content

Commit

Permalink
fix(dev): allow jsx in js files during hmr (#7112)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori authored Aug 9, 2023
1 parent ff45f1d commit fc8a3e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lovely-drinks-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

allow jsx in js files during hmr
2 changes: 1 addition & 1 deletion packages/remix-dev/compiler/js/plugins/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ declare global {
sourceCode,
output: {
contents: resultCode,
loader: args.path.endsWith("x") ? "tsx" : "ts",
loader: "tsx",
resolveDir: path.dirname(args.path),
},
};
Expand Down

0 comments on commit fc8a3e2

Please sign in to comment.