Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
Serves a webpack app. Updates the browser on changes. Documentationhttps://webpack.js.org/configuration/dev-server/.
License
webpack/webpack-dev-server
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Usewebpack with a development server that provideslive reloading. This should be used fordevelopment only.
It useswebpack-dev-middleware under the hood, which providesfast in-memory access to the webpack assets.
Please note thatwebpack-dev-server is presently in a maintenance-only modeand will not be accepting any additional features in the near term. Most new featurerequests can be accomplished with Express middleware; please look into usingthebeforeandafterhooks in the documentation.
First thing's first, install the module:
npm install webpack-dev-server --save-devNote: While you can install and run webpack-dev-server globally, we recommendinstalling it locally. webpack-dev-server will always use a local installationover a global one.
There are two main, recommended methods of using the module:
The easiest way to use it is with the CLI. In the directory where yourwebpack.config.js is, run:
node_modules/.bin/webpack-dev-serverNPM package.json scripts are a convenient and useful means to run locally installedbinaries without having to be concerned about their full paths. Simply define ascript as such:
"scripts": {"start:dev":"webpack-dev-server"}
And run the following in your terminal/console:
npm run start:devNPM will automagically reference the binary innode_modules for you, andexecute the file or command.
Either method will start a server instance and begin listening for connectionsfromlocalhost on port8080.
webpack-dev-server is configured by default to support live-reload of files asyou edit your assets while the server is running.
Seethe documentation for more use cases and options.
Whilewebpack-dev-server transpiles the client (browser) scripts to an ES5state, the project only officially supports thelast two versions of majorbrowsers. We simply don't have the resources to support every whackybrowser out there.
If you find an bug with an obscure / old browser, we would actively welcome aPull Request to resolve the bug.
We do our best to keep Issues in the repository focused on bugs, features, andneeded modifications to the code for the module. Because of that, we ask userswith general support, "how-to", or "why isn't this working" questions to try oneof the other support channels that are available.
Your first-stop-shop for support for webpack-dev-server should by the excellentdocumentation for the module. If you see an opportunity for improvementof those docs, please head over to thewebpack.js.org repo and open apull request.
From there, we encourage users to visit thewebpack Gitter chat andtalk to the fine folks there. If your quest for answers comes up dry in chat,head over toStackOverflow and do a quick search or open a newquestion. Remember; It's always much easier to answer questions that include yourwebpack.config.js and relevant files!
If you're twitter-savvy you can tweet#webpack with your questionand someone should be able to reach out and lend a hand.
If you have discovered a 🐛, have a feature suggestion, of would like to seea modification, please feel free to create an issue on Github.Note: The issuetemplate isn't optional, so please be sure not to remove it, and please fill itout completely.
We welcome your contributions! Please have a read ofCONTRIBUTING.md for more information on how to get involved.
Kees Kluskens | ![]() Andrew Powell |
This project is heavily inspired bypeerigon/nof5.
About
Serves a webpack app. Updates the browser on changes. Documentationhttps://webpack.js.org/configuration/dev-server/.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
