uniapp develops h5 to solve the problem of Network: unavailable when starting the project

I searched a lot on the Internet and found that they all said to disable the extra network card on the computer. I tried this method but it didn't work. I don't know why. Then I looked online and found that uniapp's devServer vue2 is the benchmark for webpack4's devserver (except for complex ones). function configuration item), so I checked the webpack4 documentation and found a property that was very suitable. Here is the documentation   . The following picture is my configuration item:

After that, you can open it normally and have normal LAN access.

Guess you like

Origin blog.csdn.net/m0_57033755/article/details/132895290