I installed node modules with
npm install
After that I changed few lines in one of the modules. The lines in red rectangle are where the changes has been made.
Notice that find
command line tool detects only one file with that name.
Then started my react app:
npm run start
Opening the Chrome's DevTools I expected to see those changes in the modified file, but instead the file was not affecte by any change. I mean the file looks the same way like how it initially used to be.
I cleared all browser's cache, deleted node_modules/.cache
rm -fr node_modules/.cache
I restarted the browser, even my PC. The name of the library which source I try to change is leaflet
. I have installed another modules that 'peer-depend' on that library. There are no global npm installations of leaflet
on my PC:
>:~/Coding/test/react-leaflet-marker$ npm list -g --depth=0
/home/cloud-of-sounds/.nvm/versions/node/v10.13.0/lib
├── @storybook/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
I can't get my head around that problem. Can you help me how to make my browser load these changes?
npm run start
rebuild the app too?package.json:
"scripts": { "start": "react-scripts start" }react-scripts build
, then runreact-scripts start
see if it's updated thenleaflet/dist/leaflet-src.js
vsleaflet/src/layer/marker/Icon.Default.js
), and you are being fooled about which files are being loaded because of sourcemaps. Leaflet does not rebuild when you expect.leaflet
project from github I made those changes again inleaflet/src/layer/marker/Icon.Default.js
. Next I runnpm install
andnpm run rollup
and voila! Chrome debuger now display correctly the code's modification.