-
-
Notifications
You must be signed in to change notification settings - Fork 130
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(dev): fix hot-reload with e2e test #1021
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
This reverts commit 0a32bb3.
This reverts commit 40fe8c6.
This reverts commit f8d2214.
@@ -225,7 +225,6 @@ export const fsRouterTypegenPlugin = (opts: { srcDir: string }): Plugin => { | |||
await writeFile(outputFile, formatted, 'utf-8'); | |||
}; | |||
|
|||
server.watcher.add(opts.srcDir); |
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.
Removing this fixes the issue of failing on windows and ubuntu. @tylersayshi
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.
What if we did server.watcher.add(pagesDir)
instead? .gen.ts will be outside the pages dir so this should be fine I'd think
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.
We can try, but is removing this a problem? It still generates .gen.ts 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.
The idea for adding it here is that it will updates pages.gen.ts when new pages are added or removed. Without the watcher I don't think it will be able to update while the dev server is running. Just on startup only.
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.
works on mac... I'll watch to see if the other tests pass but I expect them to 🤞
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.
looks like it passed 🎉
return code.replace( | ||
INNER_ROUTER_LINE, | ||
INNER_ROUTER_LINE + | ||
/\nconst InnerRouter = \(.*?\)=>\{/, |
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.
We need to change this to NewInnerRouter
for #1003.
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.
Let's merge.
#1021 was incomplete. This should fix it.
fix #1016
It's a regression with various changes. Adding the e2e test will help for the future.