Hey @100leiden,
Thank you for your feedback. We’ve listed this as a feature request.
This issue occurs because Cornerstone exports components as self-contained bundles. To guarantee that a component works when imported into a new site, Cornerstone automatically packages all nested child components (like your custom heading or text components) along with the parent.
Since the import manager cannot verify if the destination site’s existing components are identical or if they have different configuration histories, it creates new, duplicated instances to avoid accidentally overwriting any existing custom components on the destination site.
To mitigate or avoid this duplication, you can consider the following approaches:
1. Convert Child Components to Styled Elements (Recommended)
If your custom heading and text elements do not absolutely need to be registered as standalone Components in the Component Library, you can build them inside your parent component as standard, native Cornerstone elements (e.g., the native Heading and Text elements) styled using:
- Global CSS / Element CSS
- Global Parameters
- Presets
Because they are native elements rather than custom registered components, Cornerstone will not treat them as dependencies, and they will not be exported or duplicated.
2. Post-Import Re-linking (Clean Up)
If they must remain child components:
- Import the parent component onto the new site.
- Open the newly imported parent component in the builder.
- Delete the duplicated child components from the parent and replace them with the site’s existing/original child components.
- Go to the Component Library and delete the duplicated child components to keep the site clean.