Skip to content

Commit

Permalink
docs(changeset): fix: hmr broken
Browse files Browse the repository at this point in the history
  • Loading branch information
nksaraf committed Sep 24, 2023
1 parent 37bd40a commit 4c7fd35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-melons-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vinxi": patch
---

fix: hmr broken
2 changes: 1 addition & 1 deletion packages/vinxi/lib/plugins/fs-watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const fileSystemWatcher = () => {
config.router.internals.routes.addEventListener("reload", () => {
const { moduleGraph } = server;
const mods = moduleGraph.getModulesByFile(
fileURLToPath(new URL("./routes.js", import.meta.url)),
fileURLToPath(new URL("../routes.js", import.meta.url)),
);
if (mods) {
const seen = new Set();
Expand Down
2 changes: 1 addition & 1 deletion test/hmr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ test.describe("hmr", () => {
}`,
);

await new Promise((r) => setTimeout(r, 1000));
await new Promise((r) => setTimeout(r, 2000));

res = await fixture.requestDocument("/api/new");
expect(res.status).toBe(200);
Expand Down

0 comments on commit 4c7fd35

Please sign in to comment.