Open amribrahim1 opened 3 years ago
When I was trying to to use LiveReload, I got error TypeError: compiler.plugin is not a function webpack.mix.js :
TypeError: compiler.plugin is not a function
webpack.mix.js
const mix = require('laravel-mix'); const LiveReloadPlugin = require('webpack-livereload-plugin'); mix.js('resources/react/app.js', 'public/js') .react() .sass('resources/sass/app.scss', 'public/css') .webpackConfig({ plugins: [new LiveReloadPlugin()] });
The error was because of version 1 in npm install webpack-livereload-plugin@1 --save-dev , like in the documentation. I installed the latest version and got no error npm install webpack-livereload-plugin --save-dev
npm install webpack-livereload-plugin@1 --save-dev
npm install webpack-livereload-plugin --save-dev
When I was trying to to use LiveReload, I got error
TypeError: compiler.plugin is not a function
webpack.mix.js
:The error was because of version 1 in
npm install webpack-livereload-plugin@1 --save-dev
, like in the documentation. I installed the latest version and got no errornpm install webpack-livereload-plugin --save-dev