Solve the problem of [WDS] disconnected in the console of Vue cli project at runtime! error

At project runtime

After NPM run dev is entered into the console, the browser will display the project page, but [WDS] disconnected! Wrong

Although sometimes does not affect, but as a qualified programmer

We should try our best to repair it to avoid problems in the future

What’s the solution

In the compilation environment (take vscode as an example)

Find the webpack configuration file for the project directory

That’s webpack config JS

Find devserver in the configuration file and add the following

This is the perfect solution

Similar Posts: