I'm having trouble determining how to reference my react fork in a project I want to use it in while a PR request I made is being reviewed. Since the root package.json
is react-tools
, I can't use the npm github references. I also haven't had success making a local path reference to any of the react subdirectories I've tried.
How can i use my version of react in my separate project?
The solution here turned out to be npm link
In ./project_dir
, run npm link /path/to/react/repo/build/npm-react
This creates a sym link from the react
npm module to the project node_modules/react
directory.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.