Giter Club home page Giter Club logo

Comments (13)

tirthbodawala avatar tirthbodawala commented on May 22, 2024 1

@SC7639 I have updated the code to accept watchOptions from config to enable watch config,
Please update the file webpack/dev.babel.js
by the following option in devServer section:

const commonClientConfig = {
  // ... other config
  devServer: {
    // .. other dev server config 
    watchOptions: {
      aggregateTimeout: 300,
      poll: 1000
    }
  },
};

This should also be updated for service worker configuration just in case, ( I added backup config from above but adding it to service worker would make more sense:

const serviceWorkerConfig = {
  // ... other config
  devServer: {
    // .. other dev server config 
    watchOptions: {
      aggregateTimeout: 300,
      poll: 1000
    }
  },
};

Let me know if this fixes the issue!

from react-pwa.

tirthbodawala avatar tirthbodawala commented on May 22, 2024

@SC7639 Let me have a look at it. I have tested docker on Linux and was working fine. it is supposed to work for Windows as well but let me go through it.

from react-pwa.

tirthbodawala avatar tirthbodawala commented on May 22, 2024

@SC7639 Can you please share your windows details along with the version of docker you are using?

from react-pwa.

SC7639 avatar SC7639 commented on May 22, 2024

I'm using Windows 10 with docker for windows. I've had this issue before with things like nodemon. It's because HyperV doesn't propagate file system events so I know the fix is polling for file changes.
Output of docker version:

Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:09 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:45:38 2017
 OS/Arch:      linux/amd64
 Experimental: true

from react-pwa.

tirthbodawala avatar tirthbodawala commented on May 22, 2024

@SC7639 Were you able to configure it after this update?

from react-pwa.

tirthbodawala avatar tirthbodawala commented on May 22, 2024

Closing due to no-response

from react-pwa.

SC7639 avatar SC7639 commented on May 22, 2024

I've tried after updating the configuration and it's still not hot reloading. I've also noticed that the nodemon doesn't reload either if any of the files are changed that it's watching.

from react-pwa.

tirthbodawala avatar tirthbodawala commented on May 22, 2024

Ok. I shall debug this in detail, but I have applied the patch suggested. Is there anything we are missing?

from react-pwa.

SC7639 avatar SC7639 commented on May 22, 2024

Sorry I was wrong about it fixing the issue. I cloned a fresh version of the repo and it works. Sorry for the mix up

from react-pwa.

aaaleeex7 avatar aaaleeex7 commented on May 22, 2024

Hey i have the same issue with a react project on windows with docker/docker-compose. My whole node_modules foulder is mounted into the virtual machine so i dont have access to the node_modules folder to edit the dev.babel.js file for hot-reloading. Is there any possible soulution?

from react-pwa.

tirthbodawala avatar tirthbodawala commented on May 22, 2024

@aaaleeex7 which version of ReactPWA are you using?

from react-pwa.

aaaleeex7 avatar aaaleeex7 commented on May 22, 2024

@tirthbodawala create-react-app is v2.1.1

from react-pwa.

tirthbodawala avatar tirthbodawala commented on May 22, 2024

@aaaleeex7 I think you are posting it in wrong repo :) This repo is for ReactPWA.
Please raise an issue here: https://github.com/facebook/create-react-app/issues

from react-pwa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.