dimanche 18 avril 2021

How can I test a react-native library locally?

I currently created the package and created the "Example" folder inside it. The goal is to be able to test the react-native package itself from the "Example" folder.

I tried with npm link but it seems that it is not supported. So I tried "yarn add ../" but it is a tedious process that often requires continuous deletion of node_modules. I tried "npm pack" with which I create the .tgz and then import the tgz into Example with yarn. Is it really that complicated to test a react-native library locally or is there an easier way that doesn't require continuous deletion of node_modules?

Aucun commentaire:

Enregistrer un commentaire