question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow user to set WebpackDevServer watchOptions.poll option for react-scripts start

See original GitHub issue

This 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:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

49reactions
fsoncommented, Nov 19, 2016

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?

CHOKIDAR_USEPOLLING=true npm start
0reactions
airtonixcommented, Oct 13, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found