Skip to content
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

Should handleHotUpdate be a "first" type plugin hook? #6635

Closed
7 tasks done
cj1128 opened this issue Jan 26, 2022 · 1 comment
Closed
7 tasks done

Should handleHotUpdate be a "first" type plugin hook? #6635

cj1128 opened this issue Jan 26, 2022 · 1 comment
Labels
enhancement New feature or request feat: hmr wontfix This will not be worked on

Comments

@cj1128
Copy link

cj1128 commented Jan 26, 2022

Describe the bug

Currently the handleHotUpdate plugin hook is called sequentially for every plugin. If previous plugin returns something, it will simply be overridden by later plugin.

https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/hmr.ts#L95

Should this be a "first" type hook like resolveId and load? If some plugin returns something, then vite should stop calling others.

Reproduction

none

System Info

none

Used Package Manager

pnpm

Logs

No response

Validations

@bluwy
Copy link
Member

bluwy commented Jan 26, 2022

It used to be changed in to a first-type hook (b3b8c61), but was then reverted (#5536). It probably won't be changed to first-type again due to the explanation in the PR, so closing this.

@bluwy bluwy closed this as completed Jan 26, 2022
@bluwy bluwy added enhancement New feature or request feat: hmr wontfix This will not be worked on and removed pending triage labels Jan 26, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request feat: hmr wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants