module-hooks-conflict: Conflicting module hooks
Cause
The configuration provides both importHook and loadHook, but they do not reference the same function.
Troubleshooting
- Inspect module hooks in the top-level sandbox options and
compartmentOptions. - Check whether configuration merging supplies both hook names.
- Compare the actual function references. Separately created functions fail this check even if their implementations are identical.
Solution
Prefer providing only importHook. If compatibility code must supply both names, assign the same function to both options instead of creating separate wrapper functions.
