Changes to node_modules should trigger recompilation
Created by: gaearon
- Add
import 'react-router'
toindex.js
- See module not found error
npm install react-router
- Still see module not found error
- Press “save” in
index.js
- Now it compiled successfully!
Steps 4 and 5 should not be there. We should find a way to tell webpack that node_modules
have changed, and it’s worth trying to recompile.
Ideally we should not have situations where user is forced to stop the bundler and run npm start
again. I remember having such issues when switching branches. Hopefully fixing the above use case should be enough, but if you’re familiar with other cases where a restart is required, please write in this thread.