add before-all, after-all hooks corresponding to preProcess, postProcess
This commit is contained in:
parent
39c96e4239
commit
c8fcef387a
|
@ -29,6 +29,12 @@ export function setupExtensions(corePlugins, conf) {
|
|||
}
|
||||
|
||||
const allPlugins = [];
|
||||
|
||||
if (extMap.has("before-all")) {
|
||||
allPlugins.push(...extMap.get("before-all"));
|
||||
extMap.delete("before-all");
|
||||
}
|
||||
|
||||
for (const corePlugin of corePlugins) {
|
||||
const beforeHookName = corePlugin.hooks?.find(s => s.startsWith("before-"));
|
||||
if (beforeHookName && extMap.has(beforeHookName)) {
|
||||
|
@ -45,6 +51,11 @@ export function setupExtensions(corePlugins, conf) {
|
|||
}
|
||||
}
|
||||
|
||||
if (extMap.has("after-all")) {
|
||||
allPlugins.push(...extMap.get("after-all"));
|
||||
extMap.delete("after-all");
|
||||
}
|
||||
|
||||
// remaining extensions have no corresponding hooks.
|
||||
for (const [on, exts] of extMap) {
|
||||
for (const ext of exts) {
|
||||
|
|
Loading…
Reference in New Issue