Why do all projects configured by webpack use webpack-dev-server??

Why do all projects configured by webpack use webpack-dev-server?
what are the main uses of this plug-in? Hot update? Can"t we do without this gap?
"dev": "webpack-dev-server-- content-base. /-- open-- inline-- hot-- compress-- config build/webpack.dev.config.js",

but also like react scaffolding, vue-cli, these all have this webpack-dev-server
that must be run under localhost, can vue-cli scaffolding be configured, click on the html file to run it? Or do not run

in server mode
Mar.21,2021

ides/development/-sharp%E4%BD%BF%E7%94%A8-webpack-dev-server" rel=" nofollow noreferrer "> https://www.webpackjs.com/gui.
webpack-dev-server starts web server
Hot updates need to be equipped with
react scaffolding, vue-cli does not have to run under localhost, you can configure
want to click on the html file to run, do not use vue-cli, Build a project by yourself according to webpack's official website


thanks for inviting ~
quote in webpack 1-6 use DevServer

but in actual development you may need:
to provide HTTP services instead of using local file previews;
to listen for changes in files and automatically refresh the web page to achieve real-time preview;
to support Source Map, to facilitate debugging.

mainly provides these functions ~

you can also see the official document: ides/development/-sharpusing-webpack-dev-server" rel=" nofollow noreferrer "> webpack-dev-server
I don't know what the requirement is, which makes you want to directly click on the html file to run. webpack-dev-server is for more convenient development. Refresh the file manually without changing the file.
if you think localhost access is not good, you can also configure the domain name. You can also configure IP address access.
vue-cli modify dev.host in config/index.js to '0.0.0.0' to access it using ip address. It can also be accessed by others in the local area network.


when you finish packing, click html to run


provides a Chinese version: ides/development/-sharp%E4%BD%BF%E7%94%A8-webpack-dev-server" rel=" nofollow noreferrer "> webpack-dev-server

webpack-dev-server provides you with a simple web server that can reload (live reloading) in real time.
Menu