react-component-tree icon indicating copy to clipboard operation
react-component-tree copied to clipboard

Added support for barrel files and extensionless imports. This can be…

Open jay-herrera opened this issue 1 year ago • 4 comments

… slow since we have to search through each exported file in the barrel file

jay-herrera avatar Mar 31 '24 18:03 jay-herrera

Create a document from this PR?

If this PR introduces a new feature or an interesting change, turn it into a document.
Turn it into a doc automatically with AI, or start a doc manually with all the changes from this PR.

Document with AI  Create draft from PR

Configure these notifications in the repo settings (admins only)

Don't have access to Swimm yet? Click here to create your account and join this workspace.

swimm-io[bot] avatar Mar 31 '24 18:03 swimm-io[bot]

@jay-herrera can you give me a sample imports to test this or can you tell me if this is fine ?

export * from './foo'; 
export * from './bar'; 

we also need to add unit tests for this. thanks for the pr, let me go through the approach once

hb1998 avatar Apr 01 '24 13:04 hb1998

Hey, Habeeb! Those imports shoiuld work perfectly

jay-herrera avatar Apr 01 '24 13:04 jay-herrera

Also added support for destructured props and default exports. For now, all of these features will only work with functional components. I've tested it experimentally, but I can write unit tests when I get a chance

jay-herrera avatar Apr 02 '24 03:04 jay-herrera