Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: compiler.plugin is not a function #84

Open
amribrahim1 opened this issue Sep 12, 2021 · 0 comments
Open

TypeError: compiler.plugin is not a function #84

amribrahim1 opened this issue Sep 12, 2021 · 0 comments

Comments

@amribrahim1
Copy link

amribrahim1 commented Sep 12, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant