Homestead on Ubuntu not hot reloading JS files

38 Views Asked by At

I'm working on a Laravel project with a homestead setup on Ubuntu, and I'm only working on the JS files of the project. The JS files are in vendor folder since they are from different repos (I'm not experienced in this, so I'm not sure what can have the effect)

When I make an edit it's not hot reloaded, but if I kill node and npm run start (which runs craco start) again the edit is shown.

I tried using ChatGpt to fix it and here's his suggestions that I tried and didn't work:

  1. Use NFS instead of the default file system.
  2. Increase the inotify limit.
  3. Use a different file watcher (this I couldn't do because I couldn't install and use the watcher it suggested which was another headache)

Also, I work on the same project on a Macbook with a Valet setup and the hot-reload works just fine with the same file structure.

Follows is my craco.config.js:

module.exports = {
  style: {
    postcssOptions: {},
  },
  webpack: {
    configure: {
      resolve: {
        symlinks: false,
      },
      ignoreWarnings: [{ message: /Failed to parse source map/ }],
    },
  },
};

I think a crucial part is that we are using symbolic links for linking the folders, and BTW we use craco since we use Fuse template which uses craco.

Any help is much appreciated.

0

There are 0 best solutions below