React Native: npm link local dependency, unable to resolve module

后端 未结 8 1442
不知归路
不知归路 2020-12-23 02:14

I am developing a button ui package for react native. I try to build an example project to test this button. The directory structure is as follows:

my-button         


        
8条回答
  •  萌比男神i
    2020-12-23 02:21

    Try wml (https://github.com/wix/wml)

    It's an alternative to npm link that actually copies changed files from source to destination folders

    # add the link to wml using `wml add  `
    wml add ~/my-package ~/main-project/node_modules/my-package
    
    # start watching all links added
    wml start
    

提交回复
热议问题