<p><strong>The issue:</strong></p>

<p>When running skaffold and update watched files, I see the file sync update occur and nodemon restart the server, but refreshing the page doesn't show the change.  It's not until after I stop skaffold entirely and restart that I see the change.</p>

<pre><code>Syncing 1 files for test/dev-client:e9c0a112af09abedcb441j4asdfasfd1cf80f2a9bc80342fd4123f01f32e234cfc18
Watching for changes every 1s...
[client-deployment-656asdf881-m643v client] [nodemon] restarting due to changes...
[client-deployment-656asdf881-m643v client] [nodemon] starting `node bin/server.js`
</code></pre>

<p><strong>The setup:</strong></p>

<p>I have a simple microservices application.  It has a server side (flask/python) and a client side (react) with express handling the dev server.  I have nodemon on with the legacy watch flag as true (For Chokidar polling).   On development I'm using Kubernetes via Docker for Mac.</p>

<p><strong>Code:</strong></p>

<p>I'm happy to post my code to assist.  Just let me know which ones are most needed.</p>

<p>Here's some starters:</p>

<p>Skaffold.yaml:</p>

<pre><code>apiVersion: skaffold/v1beta7
kind: Config
build:
  local:
    push: false
  artifacts:
    - image: test/dev-client
      docker:
        dockerfile: Dockerfile.dev
      context: ./client
      sync:
        '**/*.css': .
        '**/*.scss': .
        '**/*.js': .
    - image: test/dev-server
      docker:
        dockerfile: Dockerfile.dev
      context: ./server
      sync:
        '**/*.py': .
deploy:
  kubectl:
    manifests:
      - k8s-test/client-ip-service.yaml
      - k8s-test/client-deployment.yaml
      - k8s-test/ingress-service.yaml
      - k8s-test/server-cluster-ip-service.yaml
      - k8s-test/server-deployment.yaml
</code></pre>

<p>The relevant part from Package.json:</p>

<pre><code> "start": "nodemon -L bin/server.js",
</code></pre>

<p>Dockerfile.dev (Client side):</p>

<pre><code># base image
FROM node:10.8.0-alpine

# setting the working directory 
# may have to run this depending on environment
# RUN mkdir -p /usr/src/app 
WORKDIR /usr/src/app

# add '/usr/src/app/node_modules/.bin' to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH

# install and cache app depencies
COPY package.json /usr/src/app/package.json
RUN npm install

# copy over everything else
COPY . .

# start the app.
CMD ["npm", "run", "start"]
</code></pre>

<p>It turns out I was using the wrong pattern for my file syncs.  **/*.js doesn't sync the directory properly.</p>

<p>After changing</p>

<pre><code>sync:
        '**/*.css': .
        '**/*.scss': .
        '**/*.js': .
</code></pre>

<p>to </p>

<pre><code>sync:
        '***/*.css': .
        '***/*.scss': .
        '***/*.js': .
</code></pre>

<p>It immediately began working.</p>

<hr>

<p>Update:
On the latest versions of skaffold, this pattern no longer works as skaffold abandoned flattening by default.  You can now use **/* patterns and get the same results.</p>
