Allow user to set WebpackDevServer watchOptions.poll option for react-scripts start
See original GitHub issueThis could potentially be done by modifying the instantiation of the WebpackDevServer in start.js to look like:
...
watchOptions: {
ignored: /node_modules/,
poll: process.env.REACT_APP_POLL || undefined,
}
...
This use case is important to me (and others) because I’m developing in a Docker container, which has issues with inotify (due to mounting volumes with aufs), which precludes the automatic rebuild without the watchOptions poll setting.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Watch and WatchOptions | webpack
Watch and WatchOptions. Webpack can watch files and recompile whenever they change. This page explains how to enable this and a couple of...
Read more >Advanced Configuration - Create React App
Variable Development Production
BROWSER ✓ Used 🚫 Ignored
BROWSER_ARGS ✓ Used 🚫 Ignored
HOST ✓ Used 🚫 Ignored
Read more >Top 5 webpack-dev-server Code Examples - Snyk
Learn more about how to use webpack-dev-server, based on webpack-dev-server code examples created from the most popular ways it is used in public...
Read more >Set webpacker dev server watch options (poll ... - Stack Overflow
Question: But how can I set the environmental variables for watch-options (i.e. poll ) via environmental variable?
Read more >Overriding the Create-React-App Webpack Configuration ...
Create -React-App is a great tool to bootstrap React apps, but it offers only limited access to the configuration of the production build....
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 Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
Chokidar, which Webpack uses for watching changes has an environment to force the use of polling:
CHOKIDAR_USEPOLLING
. Does this fix the issue with Docker?you know, if all these nodejs people writing cli apps used
nconf.env().argv()
we’d be able to set configuration through environment variables or command line arguments.