我正在遵循這些
如果重要的話,以上來自 VS Code 的 Bash 終端,我運行的是 Windows 10。
2) 獎勵:為了實時重新加載位于專案根檔案夾中的靜態 index.html 檔案,我需要進行哪些配置更改?
uj5u.com熱心網友回復:
此配置應該可以解決問題:
devServer: {
hot: false, // optional, but you must not set both hot and liveReload to true
liveReload: true
}
可以使用此插件配置實作靜態 index.html 的實時重新加載:
plugins: [
...,
new HtmlWebpackPlugin({ template: "src/index.html" })
]
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/314040.html
