Manually maintain the Component Factory

Version: 22.x

The Component Factory is a mapping between Sitecore renderings and their JSS component implementations that JSS apps use to match renderings to components. JSS automatically updates the mapping when you add new components, but you can also maintain it manually.

To maintain the Component Factory manually:

  1. Add the Component Factory file to source control.

  2. Delete the scripts/generate-component-factory.[ts|js] file.

  3. In Next.js applications, remove the scripts/templates/component-factory.ts file.

  4. In the scripts/bootstrap.[ts|js] file, remove any usage of the Component Factory generation file.

Do you have some feedback for us?

If you have suggestions for improving this article,