Skip to content
This repository was archived by the owner on Sep 7, 2026. It is now read-only.
This repository was archived by the owner on Sep 7, 2026. It is now read-only.

Livereload is not triggered on file change #674

Closed as not planned
Closed as not planned

Description

@alan-agius4

Bug report

Actual Behavior

Live reload is not triggered on file change

Expected Behavior

Live reload is triggered on file change

How Do We Reproduce?

git clone https://github.com/alan-agius4/copy-webpack-plugin-issue.git
yarn
yarn webpack-dev-server --open
mv asset/2.jpeg asset/1.jpeg

Notice that the image is not changed as live reload is not triggered.

  System:
    OS: macOS 11.6.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 4.29 GB / 64.00 GB
  Binaries:
    Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v14.18.1/bin/yarn
    npm: 6.14.16 - ~/.nvm/versions/node/v14.18.1/bin/npm
  Browsers:
    Chrome: 99.0.4844.51
    Firefox: 91.6.0
    Safari: 15.3
  Packages:
    copy-webpack-plugin: ^10.2.4 => 10.2.4 
    webpack: ^5.70.0 => 5.70.0 
    webpack-cli: ^4.9.2 => 4.9.2 
    webpack-dev-server: ^4.7.4 => 4.7.4 

Activity

  1. alexander-akait commented on Mar 4, 2022

    @alexander-akait
    Member

    Can you reproduce it using 5.69.0?

  2. alan-agius4 commented on Mar 4, 2022

    @alan-agius4
    ContributorAuthor

    I did try that and I still didn't work. I also tried older version like 5.10 and it still didn't work.

  3. alexander-akait commented on Mar 4, 2022

    @alexander-akait
    Member

    Maybe related to MacOS...

  4. alan-agius4 commented on Mar 4, 2022

    @alan-agius4
    ContributorAuthor

    I asked the user that original reported the issue originally in angular/angular-cli#22751 to provide more about their system.

    Did live reload work for you when you tried the reproduction?

  5. alexander-akait commented on Mar 4, 2022

    @alexander-akait
    Member

    @alan-agius4 I haven't tried it yet, I've set it to my tasks, I can look tomorrow, just ask more information as possible

  6. alan-agius4 commented on Mar 4, 2022

    @alan-agius4
    ContributorAuthor

    Looks like the user that reported the issue is also using Mac. angular/angular-cli#22751 (comment)

  7. alexander-akait commented on Mar 6, 2022

    @alexander-akait
    Member

    @alan-agius4 Sorry for delay, looks like problem in webpack, because hash of compilation is the same, so dev server doesn't reload page, I have two workarounds, but want to verify it is valid fixes, I will return to this today/tomorrow (waiting answer)

  8. alan-agius4 commented on Mar 6, 2022

    @alan-agius4
    ContributorAuthor
  9. alan-agius4 commented on Jun 3, 2022

    @alan-agius4
    ContributorAuthor

    Gentle reminder @alexander-akait

  10. alexander-akait commented on Jun 3, 2022

    @alexander-akait
    Member

    @alan-agius4 oh, sorry, missed that, put in my TODO for tomorrow

  11. OttoDoorenbos commented on Jun 7, 2022

    @OttoDoorenbos

    @alexander-akait

    Same issue on Windows. Angular 14.

    [webpack-dev-server] App updated. Recompiling...
    [webpack-dev-server] Nothing changed.

    Change in files in the app folder and globel scss files are detected. Change in files in the assets folder are not detected.

    image

  12. alexander-akait commented on Jun 7, 2022

    @alexander-akait
    Member

    @alan-agius4 @Mylogin-info bug in webpack-dev-server, we can't fix it here webpack/webpack-dev-server#3794, updated an issue and put your example, copy-webapck-plugin does right job here, dev server doesn't respect hash changed

  13. alan-agius4 commented on Jun 9, 2022

    @alan-agius4
    ContributorAuthor

    @alexander-akait, thanks let's continue tracking this in webpack/webpack-dev-server#3794

  14. Trirandom commented on Apr 26, 2023

    @Trirandom

    Same issue on Windows. Angular 14.

    [webpack-dev-server] App updated. Recompiling...
    [webpack-dev-server] Nothing changed.

    Force those who are looking for a workaround,
    I used the package "@angular-builders/custom-webpack": "^14.1.0" that allows to use an extra webpack config, and in this file:

    module.exports = {
        devServer: {
            watchFiles: ["src/**/*"],
        },
    };
    

    This solved my issue, hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions