statianzo / webpack-livereload-plugin

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

TypeError: compiler.plugin is not a function (Webpack 5 plugin API change) #74

Closed deltork closed 2 years ago

deltork commented 2 years ago

Webpack 5 has changed the API for the plugin interface ( similar issue https://github.com/webpack/webpack/issues/11672). Therefore when I try to use this plugin, I get this error [webpack-cli] TypeError: compiler.plugin is not a function at LiveReloadPlugin.apply (node_modules\webpack-livereload-plugin\index.js:110:12)

statianzo commented 2 years ago

@deltork that error on that line number refers to 1.x version of this plugin designed for webpack 2. Upgrade to the latest and try again.