statianzo / webpack-livereload-plugin

LiveReload during webpack --watch
ISC License
204 stars 51 forks source link

Fix notify by all changes #59

Closed web-mi closed 4 years ago

web-mi commented 4 years ago

I changed the logic of file changes detection to check for emitted. Now only the newly written files will be notified. For ignore i added the anymatch because its easier to use when ignoring different files. Added extra logic for array to have backwards compatibility.

The last problem which i can't resolve is that webpack will always generate multiple assets when you have enabled MiniCssExtractPlugin for example. There is no hash for assets. Only for the whole chunk. So this can't be solved currently.

web-mi commented 4 years ago

I added the ability to use simple file source hash to trigger changes. This will simply prevent reload if MiniCssExtractPlugin is used and multiple files are regenerated at once. This should prevent all problems now.

web-mi commented 4 years ago

Perfekt. Will you create a new release too?

statianzo commented 4 years ago

Pushed as 2.3.0

web-mi commented 4 years ago

Pushed as 2.3.0

Could you create the tag too and make the npm publish so its installable over npm? This would be great ;-)

statianzo commented 4 years ago

It's on npm already: https://www.npmjs.com/package/webpack-livereload-plugin/v/2.3.0

I missed the --tags flag for the git push. Pushed it ⬆️