webpack-dev-server
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
@types/bonjour | 3.5.13 | 2.32 kB | MIT | prod | |
@types/connect-history-api-fallback | 1.5.4 | 1.88 kB | MIT | prod | |
@types/express | 4.17.21 | 2.64 kB | MIT | prod peer | |
@types/serve-index | 1.9.4 | 1.87 kB | MIT | prod | |
@types/serve-static | 1.15.7 | 7.61 kB | MIT | prod | |
@types/sockjs | 0.3.36 | 1.98 kB | MIT | prod | |
@types/ws | 8.5.10 | 4.96 kB | MIT | prod | |
ansi-html-community | 0.0.8 | 7.32 kB | Apache-2.0 | prod | |
bonjour-service | 1.2.1 | 16.64 kB | MIT | prod | |
chokidar | 3.6.0 | 25.83 kB | MIT | prod | |
colorette | 2.0.20 | 4.94 kB | MIT | prod | |
compression | 1.7.4 | 7.64 kB | MIT | prod | |
connect-history-api-fallback | 2.0.0 | 4.13 kB | MIT | prod | |
default-gateway | 6.0.3 | 4.31 kB | BSD-2-Clause | prod | |
express | 4.19.2 | 209.73 kB | MIT | prod | |
graceful-fs | 4.2.11 | 9.57 kB | ISC | prod | |
html-entities | 2.5.2 | 280.65 kB | MIT | prod | |
http-proxy-middleware | 2.0.6 | 18.14 kB | MIT | prod | |
ipaddr.js | 2.2.0 | 60.85 kB | MIT | prod | |
launch-editor | 2.6.1 | 4.75 kB | MIT | prod | |
open | 8.4.2 | 12.6 kB | MIT | prod | |
p-retry | 4.6.2 | 3.81 kB | MIT | prod | |
rimraf | 3.0.2 | 6.33 kB | ISC | prod | |
schema-utils | 4.2.0 | 15.34 kB | MIT | prod | |
selfsigned | 2.4.1 | 9.04 kB | MIT | prod | |
serve-index | 1.9.1 | 62.28 kB | MIT | prod | |
sockjs | 0.3.24 | 21.39 kB | MIT | prod | |
spdy | 4.0.2 | 16.17 kB | MIT | prod | |
webpack-dev-middleware | 5.3.4 | 81.53 kB | MIT | prod | 1 1 |
webpack | 5.91.0 | 4.71 MB | MIT | prod peer | 1 1 |
ws | 8.16.0 | 32.35 kB | MIT | prod |
Webpack-dev-server is a development server that provides live reloading for your webpack application. Its primary use is to significantly speed up the development process by automatically loading the changes you make without having to manually refresh your browser. It should be noted that this tool is recommended for development use only and not for deployment in a production environment. Under the hood, webpack-dev-server leverages webpack-dev-middleware to provide rapid in-memory access to the webpack assets.
Using webpack-dev-server is straightforward. First, you need to install the module. You can do so using npm, yarn, or pnpm:
npm install webpack-dev-server --save-dev
or
yarn add -D webpack-dev-server
or
pnpm add -D webpack-dev-server
Once installed, you can use the webpack-dev-server in several ways:
npx webpack serve
in the directory where your webpack.config.js
is.{
"scripts": {
"serve": "webpack serve"
}
}
And then, you can start your development server with npm run serve
. 3. With the API: You can also start a server via the API. 4. With TypeScript: If you use TypeScript in your webpack config, you'll need to properly type devServer
property to avoid TypeScript errors.
By default, the server instance will start listening for connections from localhost
on port 8080
.
The detailed documentation for webpack-dev-server can be found here. This provides an exhaustive list of all configuration options and additional use cases. Whether you are a JavaScript beginner or experienced coder, you can count on the documentation to be a valuable resource for your web development journey.