In Laravel-mix@6.0.1 got unknown error Uncaught DOMException: Failed to construct 'WebSocket'
While running script with
yarn mix watch --hot
but without --hot seems every thing work fine. not sure why this error thrown with only --hot argument.
Info
// package.json
{
"private": true,
"devDependencies": {
"@babel/preset-react": "^7.12.10",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
"cross-env": "^7.0",
"laravel-mix": "^6.0.10",
"postcss": "^8.1",
"react-hot-loader": "^4.13.0",
"react-refresh": "^0.9.0",
"resolve-url-loader": "^3.1.0"
}
}
// webpack-mix.js
mix.webpackConfig({
resolve: {
extensions: [".js", ".jsx"],
alias: {
"@": __dirname + "/resources/js",
},
},
});
mix.js("resources/js/index.js", "public/js").react();
