-
Notifications
You must be signed in to change notification settings - Fork 923
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: remove temp page files and load page component via bundler (close #1584) #1606
base: main
Are you sure you want to change the base?
Conversation
ca281d1
to
b4ff6a7
Compare
Pull Request Test Coverage Report for Build 11266089171Details
💛 - Coveralls |
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 ecosystem and downstream plugins need a new option, I would design it as onPageUpdate
Technically speaking, a plugin can get all pages in onInitialized
lifecycle, but when a new page is added, changed or removed in devServer, a plugin cannot subscribe because page generating and extendsPage hook are all async, we are watching the temp files before this PR, but this workaround no longer works now.
So to let the plugin work well, the onPageUpdate
should be:
onPageUpdated(app: App, type: 'add' | 'change' | 'remove', oldPage: Page | null, newPage: Page | null)
Or we can split it into 3 subscriber:
onPageAdded(app: App, newPage: Page | null)
onPageChanged(app: App, oldPage: Page, newPage: Page)
onPageRemoved(app: App, oldPage: Page)
25a3396
to
5488138
Compare
24183b7
to
b091364
Compare
Before submitting the PR, please make sure you do the following
close #123
).What is the purpose of this pull request?
Description
Closes #1584
Changes:
TODOs
HMR