A
A
Alexander Ivanov2018-08-08 10:39:22
npm
Alexander Ivanov, 2018-08-08 10:39:22

Why does npm watch fall off periodically?

At one not perfect moment, hot reload stopped working as well as watch
, at first reinstalling npm i helped
, and now it helps a lot and it’s not cool to reinstall every time
. What could be the matter?
using laravel.su/docs/5.4/mix

let mix = require('laravel-mix'),
    options = mix.options({}),
    hmr = options.config.hmr;

mix.webpackConfig({
    resolve: {
        modules: [
            path.join(__dirname, "node_modules"),
            path.join(__dirname, 'resources', 'assets', 'js', 'sass', 'scss', 'css'),
        ]
    },
    output: {
        publicPath: hmr ? ('http://localhost:8080/') : '/'
    }
});

mix.disableNotifications();

mix.js( ... );

if (mix.inProduction()) {
    mix.version();
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question