LogoRobo.js
Framework

prioritizeHookAfter()

Function: prioritizeHookAfter()

function prioritizeHookAfter(
   hookType, 
   pluginName, 
   afterPlugin): void

Set a plugin's hook to run after another plugin's hook. Adjusts the priority to be 10 more than the target plugin's priority.

Parameters

ParameterTypeDescription
hookTypeLifecycleHookTypeThe lifecycle hook type
pluginNamestringThe plugin to deprioritize
afterPluginstringThe plugin that should run before

Returns

void

Example

import { prioritizeHookAfter } from 'robo.js'

// Ensure mock runs after server
prioritizeHookAfter('start', '@robojs/mock', '@robojs/server')

On this page