-
Notifications
You must be signed in to change notification settings - Fork 923
feat(client): add onContentUpdated composition API #1620
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
Conversation
Pull Request Test Coverage Report for Build 13484345740Details
💛 - Coveralls |
uepress/docs also needs a PR |
|
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.
e2e tests are required
onContentUpdated
hooks
@meteorlxy @Mister-Hope |
I think the Vite behavior is expeceted. Vite use cache header to let browser caches imported modules natively, and when you triggered a HMR, the page is reloaded with the updated module appended with a query In another word, The same behavior is observed with Vite Typescript template: https://stackblitz.com/edit/vitejs-vite-q2vxvna7?file=src%2Fcounter.ts&terminal=dev (tested locally as stackblitz perform hotload while editing), where HMR is triggered when modifying counter.ts |
Before submitting the PR, please make sure you do the following
close #123
).What is the purpose of this pull request?
Description
When the markdown content changes, using the built-in Vue lifecycle hooks does not work well, so the
onContentUpdated
hook has been added to properly listen for changes in the content.This applies to scenarios such as
medium-zoom
orphoto-swipe
that require reinitialization when the page content changes.