The solution to the problem that the webpack local development environment cannot be accessed by IP

亚连
Release: 2018-05-25 16:19:54
Original
1923 people have browsed it

Below I will share with you a solution to the problem that the webpack local development environment cannot be accessed by IP. It has a good reference value and I hope it will be helpful to everyone.

Problem description:

You can only use http://localhost:8080 to access the project, not http://local IP: 8080 access

Solution:

Add

host:'0.0.0.0'# to the webpack dev configuration file

##The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Ajax to verify the uniqueness of the user

How to use AJAX to implement on-demand loading

Unlimited hierarchical and tree structure data additions, deletions and modifications

The above is the detailed content of The solution to the problem that the webpack local development environment cannot be accessed by IP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!