Changes to node_modules should trigger recompilation
See original GitHub issue- 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.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to trigger hot reloading for React when a package in ...
I make a change in a component, webpack recompiles, updates the package in the node_modules of the docs and then a rebuild is...
Read more >How do I wire up Browsersync and Gulp in my Lando app?
Browsersync open in new window is a nodejs package that synchronizes website changes to the browser. While it can be used for many...
Read more >TypeScript Compiling with Visual Studio Code
The easiest way to install TypeScript is through npm, the Node.js Package Manager. ... Later in the article, we'll discuss how you can...
Read more >File Watchers | WebStorm Documentation - JetBrains
Click Yes to activate the File Watcher with the default configuration. ... Changes in these files will invoke the File Watcher either ...
Read more >Run builds on file changes using watch with npm scripts
1. Add version control to npm packages using git init · 2. Add manifest files to npm packages using npm init · 3....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What about using this? https://github.com/ericclemmons/npm-install-webpack-plugin I think that solves our problem.
I have a vague recollection that this used to “just work” with npm2, but that it stopped working after I upgraded to npm3.
Didn’t have a chance to look into that, though.