webpack / webpack/webpack-dev-server

reload browser when hash is changed but no modules was updated

Open
#3,794 25 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.8k
Forks
1.5k
Avg merge
5h 32m
Merged PRs (30d)
6

Description

@alexander-akait Thanks for the feedback!

I have completely removed the staticOptions and setup the directory for my static files. I also removed wds + src watch content base (old) option. After that, all edited twig files triggers a new compilation, but still no browser reload. With hot: false, it works, weird 🤔

Then I have set the watchFiles option to ['src/**/*.twig'] with hot: true: it works!
Every file change trigger a compilation and browser reload.

Is that configuration looks fine to you or should I share my private repo with you for further check?
Thanks a lot mate 😉

Originally posted by @xavierfoucrier in https://github.com/webpack/webpack-dev-server/issues/2758#issuecomment-902289933

ref: https://github.com/webpack-contrib/copy-webpack-plugin/issues/674

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names webpack-dev-server options including hot, watchFiles, directory, and static files, and references copy-webpack-plugin issue #674. Start by reproducing the Twig-file change with hot enabled and no updated modules; done means determining and documenting or fixing why the browser does not reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.