Skip to content

Commit

Permalink
Use polling inside docker container
Browse files Browse the repository at this point in the history
Without polling, file changes from a mounted volume may not be detected.
See similar [nodemon caveat](https://github.com/remy/nodemon#application-isnt-restarting).
Although `/.dockerenv` content [is not being used anymore](moby/libnetwork#815),
it still seems to be a reilable way to detect whether we are running inside
a Docker container.
  • Loading branch information
sebn committed Dec 9, 2017
1 parent 0b1d474 commit 2908be3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/elm-live.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ ${dim("elm-live:")}
const watcher = chokidar.watch("**/*.elm", {
ignoreInitial: true,
followSymlinks: false,
usePolling: fs.existsSync("/.dockerenv"),
ignored: "elm-stuff/generated-code/*"
});

Expand Down

0 comments on commit 2908be3

Please sign in to comment.