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
Refactor FS references in the Base Server #32179
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,7 +171,7 @@ export default class DevServer extends Server { | |
this.pagesDir = findPagesDir(this.dir) | ||
} | ||
|
||
protected readBuildId(): string { | ||
protected getBuildId(): string { | ||
return 'development' | ||
} | ||
|
||
|
@@ -700,10 +700,18 @@ export default class DevServer extends Server { | |
}) | ||
} | ||
|
||
protected getPagesManifest(): undefined { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes since I refactored the caller conditions in the base server a bit so they'are always called: https://github.com/vercel/next.js/pull/32179/files?diff=unified&w=0#diff-2b8e3503c1bebf856610a5551d9c5996435b99f45db389d4eeac1b671518875eL306-R310 Goal is to eventually get rid of ad-hoc dev server logic from the base server. |
||
return undefined | ||
} | ||
|
||
protected getMiddleware(): never[] { | ||
return [] | ||
} | ||
|
||
protected getMiddlewareManifest(): undefined { | ||
return undefined | ||
} | ||
|
||
protected async hasMiddleware( | ||
pathname: string, | ||
isSSR?: boolean | ||
|
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 do we think about trying to make these async when possible? I know that we can have some of this pre-calculated, but I feel like if it's easy during rewrite, making them async is just more flexible later on
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.
Yeah I think we can totally do that in an upcoming PR. Would be good to do the same for
require
too!