Home > Web Front-end > JS Tutorial > Solve the problem that webpack cannot access 127.0.0.1

Solve the problem that webpack cannot access 127.0.0.1

亚连
Release: 2018-06-05 14:53:25
Original
2939 people have browsed it

Below I will share with you an article that solves the problem that webpack cannot access localhost through IP address. It has a good reference value and I hope it will be helpful to everyone.

1. Problem description:

Today I used webpack (v1.14.0) to configure local services. In order to preview the development effect on the mobile terminal, You need to save the QR code through the IP address and then scan it with your mobile phone to access. But found that localhost cannot be accessed through ip.

2. Solution:

After multiple inquiries, just add the parameter --host 0.0.0.0 when npm run dev.

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

Related articles:

How to dynamically add and delete data in AngularJS?

Detailed interpretation of elements, components, instances and nodes in React

How to dynamically add and delete div methods in angularJS

The above is the detailed content of Solve the problem that webpack cannot access 127.0.0.1. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template