-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Perform HMR updates for non-Astro pages #3651
Conversation
|
@@ -34,12 +34,24 @@ if (import.meta.hot) { | |||
} | |||
}); | |||
} | |||
function isPage(path: string) { | |||
if (!path.includes('/pages/')) return false; | |||
const parts = path.split('/pages/').slice(1); |
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 don't have a config option for pages
, so this value will always be correct
if (file.acceptedPath.endsWith('.astro')) { | ||
hasAstroUpdate = true; |
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.
This was the old "is this a page?" logic, which is incorrect now.
Closing in favor of #3706 |
Changes
addPageExtension
hook #3628.astro
extensionTesting
Tested manually
Docs
Bug fix only