Home > Article > Web Front-end > Implement remote access configuration method in webpack-dev-server
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" },
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" },
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!