Created by: tabrezm
When using npm link to depend on a forked version of react-scripts, the paths are set up incorrectly such that the source files in the react-scripts template get used instead of the actual source files from the app.
Repro steps:
- Create a package using the public version of
create-react-app
. - Clone
create-react-app
from GitHub and convertpackages/react-scripts
to a scoped package. For example, change this:
"name": "react-scripts",
"version": "0.7.0",
to this:
"name": "@tabrezm/react-scripts",
"version": "0.0.0",
- Run
npm link
frompackages/react-scripts
. - Run
npm link @tabrezm/react-scripts
from the folder for the package created in step 1. Also, change the following lines inpackage.json
from this:
"devDependencies": {
"react-scripts": "0.7.0"
},
to this
"devDependencies": {
"@tabrezm/react-scripts": "0.0.0"
},
- Change something in
App.js
and runnpm start
.
Expected: see new content
Actual: see content from template in react-scripts
instead
Full discussion: https://github.com/facebookincubator/create-react-app/issues/682#issuecomment-263500172