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:
-
Add the Component Factory file to source control.
-
Delete the
scripts/generate-component-factory.[ts|js]
file. -
In Next.js applications, remove the
scripts/templates/component-factory.ts
file. -
In the
scripts/bootstrap.[ts|js]
file, remove any usage of the Component Factory generation file.