laravel-mix-docs icon indicating copy to clipboard operation
laravel-mix-docs copied to clipboard

TypeError: compiler.plugin is not a function

Open amribrahim1 opened this issue 3 years ago • 0 comments

When I was trying to to use LiveReload, I got error 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

amribrahim1 avatar Sep 12 '21 09:09 amribrahim1