"importedFrom" prop path issue

#65 · closed · 1 comments

View on GitHub ↗

thedeviousdev

Hi there, having an issue similar to https://github.com/moroshko/react-scanner/issues/61 I'm returning no results. However if I omit the `importedFrom` prop, I am getting results that use components from that directory (eg. ` "file": "/Users/.../.../.../.../web/src/mochi/Table/Format/Whom.tsx",` I'd like to find out how many times a component has been used that was imported from the `mochi` directory. This is my config: ``` module.exports = { crawlFrom: './src', // prettier-ignore importedFrom: '/mochi/', includeSubComponents: true, globs: ['**/!(*.test|*.spec).@(js|ts)?(x)'], processors: [ [ 'count-components-and-props', { outputTo: 'reports/components-and-props.json' }, ], ['count-components', { outputTo: 'reports/components-count.json' }], ['raw-report', { outputTo: 'reports/components-raw.json' }], ], }; ``` Where the folder structure is: ``` ├── src │   ├── mochi │   │   ├── ... │   │   ├── ... │   │   ├── ... ```

Comments

thedeviousdev

Solved, the importedFrom folder regex was incorrect