mateodelnorte / meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?
MIT License
2.06k stars 100 forks source link

Unable to reuse one react component in another react app repository #307

Closed vineet0609 closed 1 year ago

vineet0609 commented 2 years ago

🤓 Question

This is my project structure.

MetaRepo:- ReactChild-1:- src -> component -> index.js node_modules package.json ReactChild-2:- src -> component -> index.js node_modules package.json node_modules package.json

I want to use meta repo for multiple react projects.

Right now I have two react-based projects ReactChild-1 & ReactChild-2.

I want to reuse the code of one component from ReactChild-2 into ReactChild-1.

I have run the command :- meta npm link --all

it's linking all the child repo into node_modules of meta repo (at root level)

but I'm unable to understand how I will import components from ReactChild-2 into ReactChild-1.

and I am getting the following error.

Module parse failed: Unexpected token (8:8) File was processed with these loaders:

Please help me.

Thanks in advance.

vineet0609 commented 2 years ago

@mateodelnorte , could you please help me on this?

mateodelnorte commented 2 years ago

Hi. This is a webpack issue, not a meta issue. I’d suggest researching how to use npm link and webpack together.

On Wed, Nov 23, 2022 at 1:36 AM vineet0609 @.***> wrote:

@mateodelnorte https://github.com/mateodelnorte , could you please help me on this?

— Reply to this email directly, view it on GitHub https://github.com/mateodelnorte/meta/issues/307#issuecomment-1324656683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEHOX34BL62AH27UM43JX3WJXCPNANCNFSM6AAAAAASGVNEEQ . You are receiving this because you were mentioned.Message ID: @.***>