Ensure data accuracy
Things you'll need to know to ensure you have accurate and consistent component data.
After scanning your codebase, you might be informed about possible data issues through the Web app.
These issues can cause the following symptoms:
Duplicate components
Some of the components are tagged as
external
but they shouldn't beThe usage counts of some components are inconsistent
They can happen when:
Omlet is unable to resolve imports from external packages. For example, if 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 is unable to resolve your import paths properly if you have aliases 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