These docs cover qiankun 3.0 (RC) — install it with npm i qiankun@rc. For 2.x, see the v2 docs.
Skip to content

module-hooks-conflict: Conflicting module hooks ​

Cause ​

The configuration provides both importHook and loadHook, but they do not reference the same function.

Troubleshooting ​

  1. Inspect module hooks in the top-level sandbox options and compartmentOptions.
  2. Check whether configuration merging supplies both hook names.
  3. 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.

Released under the MIT License.