statianzo / webpack-livereload-plugin

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

Webpack 4 support #40

Closed thaoms closed 6 years ago

thaoms commented 6 years ago

This plugin breaks in Webpack 4.

(node:31933) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(node:31933) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead
Live Reload listening on port 35729

/Users/thomas/Desktop/websites/chilli-start-2/node_modules/tapable/lib/Tapable.js:63
        throw new Error(`Plugin could not be registered at '${name}'. Hook was not found.\n` +
        ^

Error: Plugin could not be registered at 'html-webpack-plugin-before-html-generation'. Hook was not found.
BREAKING CHANGE: There need to exist a hook at 'this.hooks'. To create a compatiblity layer for this hook, hook into 'this._pluginCompat'.
ilkkao commented 6 years ago

html-webpack-plugin-before-html-generation error doesn't seem to be related to this plugin. I'm only seeing the first warning when using this plugin alone. Fixed it here: https://github.com/statianzo/webpack-livereload-plugin/pull/42

statianzo commented 6 years ago

Merged the fix in #42. Thanks.