reload browser when hash is changed but no modules was updated

未關閉
#3,794 25 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
20/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
javascript, webpack
領域
devtools

研究方向

報告列出了 webpack-dev-server 的選項,包括 hot、watchFiles、directory 和靜態檔案,並引用了 copy-webpack-plugin issue #674。首先在啟用 hot 且沒有更新模組的情況下重現 Twig 檔案的變更;完成的標準是確定並記錄瀏覽器不重新載入的原因,或修正該問題。

由索引模型根據 Issue 內容生成。

描述

@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

主要語言
JavaScript
星號
7.9k
分支
1.5k
平均合併
2 天 12 小時
30 天內合併 PR
8

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

webpack/webpack-dev-server 的其他 Issue

查看 webpack/webpack-dev-server 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。