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-registration-sealed: Document module registration is closed ​

Cause ​

The first call to importDocumentModules() closes the document module set to further registration. Calling registerDocumentModule() afterward throws this error.

Troubleshooting ​

  1. Check the order of these two methods in your custom loader or streaming integration.
  2. Check whether importDocumentModules() runs before all document modules have been registered.
  3. Look for asynchronous callbacks that submit additional document modules after importing begins.

Solution ​

Register all modules in the current document before calling importDocumentModules(). Use the Compartment's import() or load() for modules needed on demand afterward. Document module registration cannot be reopened once it has ended.

Released under the MIT License.