Skip to content

wjj5728/webpack-html-plugin-reload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

HTML Webpack Plugin Reload

如果在webpack-dev-server开启hot模式的情况,修改html模板是无法自动刷新的,之后在一个webpack教程中找到了一个方案, 后来在使用中发现当在入口文件中加入

if (module.hot) {
    module.hot.accept()
}

html文件还是无法刷新 后来发现有webpack-html-plugin可以完成 全部代码都来自于两者的结合 andrewcoelho zsy1993

用法

// in webpack.config.js

var ReloadPlugin = require('webpack-html-plugin-reload');

//

plugins: [
    new ReloadPlugin()
]

//

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published