Ensure data accuracy

Things you'll need to know to ensure you have accurate and consistent component data.

After scanning your codebase, you might experience the following symptoms:

  • Duplicate components

  • Some of the components are tagged as external but they shouldn't be

  • The usage counts of some components are inconsistent

These issues happen when:

  • Omlet is not able to resolve imports from external packages. Let's say your design system library is used in your application repositories as an external dependency; the CLI will need to map imports from the build to their sources correctly.

  • Omlet may not be resolving your import paths properly if you have aliases set up in a TSConfig file or bundlers like Webpack, Babel, or Vite.

Omlet tries to detect these automatically, but it might not work for your specific setup.

To resolve imports from external packages or map aliases, you can create .omletrc file in the root directory of your repository and define exports or aliases properties. Follow the below instructions depending on your use case:

If you have components scanned unnecessarily, such as Storybook stories and test files or duplicate components coming from the dist folders, you can prevent the CLI from scanning those components by defining their glob patterns. You can learn more here:

You can also follow the Config file tutorial with a sample codebase:

Need help?

If you need more help or have questions, feel free to contact us at support@omlet.dev.

Last updated