Implement remote access configuration method in webpack-dev-server

亚连
Release: 2018-06-05 14:59:49
Original
1749 people have browsed it

Below I will share with you a webpack-dev-server remote access configuration method, which has a good reference value and I hope it will be helpful to everyone.

The webpack-dev-server configured in the package.json file below is in development mode and can be accessed using http://localhost:8080 or http://127.0.0.1:8080

"scripts": { "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", "build": "rimraf dist && cross-env NODE_ENV=production webpack --progress --hide-modules" },
Copy after login

When remote access is required, modifications need to be made in package.json

"scripts": { "dev": "webpack-dev-server --host 10.30.1.102 --devtool eval --progress --colors --hot --content-base build", "build": "rimraf dist && cross-env NODE_ENV=production webpack --progress --hide-modules" },
Copy after login

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

Related articles:

How to use select assignment ng-options configuration method in angularjs?

How to use select to load data and select the default value in AngularJS?

Use vue-router to build the bottom navigation bar in vue-cli (detailed tutorial)

The above is the detailed content of Implement remote access configuration method in webpack-dev-server. 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!