-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat: support object style hooks #9634
Conversation
This one it ready |
} as Plugin['transform'] | ||
} else { | ||
return handler | ||
} |
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.
Maybe it is worth extracting a helper for these three functions to avoid repeating the function or object handling?
} | ||
} | ||
await Promise.all(parallelPromises) | ||
} |
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.
Neat. Not for this PR, but a helper like this one for hookSequential
could be good too.
Looks great! I think we should merge this in 3.1 as you suggest. We shouldn't restrict the rollup version in a patch. It will also help plugin authors with their required ranges. |
based on recent [recent changes](rollup/rollup#4600) and upcoming [PR](vitejs/vite#9634)
await Promise.all([ | ||
...resolved | ||
.getSortedPluginHooks('configResolved') | ||
.map((hook) => hook(resolved)), |
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
inside the hook no loger points to the plugin object:
#10031
Description
Vite support for rollup/rollup#4600
Additional context
This PR should await rollup/rollup#4600 to get shipped and probably should release as a minor version bump.
Progress
Plugin format validation in dev? (e.g. missinghandler
or not function etc.). We don't have it previously.configureServer
,configResolved
, etc).transformIndexHtml
- feat: align object interface fortransformIndexHtml
hook #9669What is the purpose of this pull request?