Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Serves a webpack app. Updates the browser on changes. Documentationhttps://webpack.js.org/configuration/dev-server/.

License

NotificationsYou must be signed in to change notification settings

webpack/webpack-dev-server

npmnodedepstestscoveragechat

webpack-dev-server

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.

Project in Maintenance

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.

Getting Started

First thing's first, install the module:

npm install webpack-dev-server --save-dev

Note: 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.

Usage

There are two main, recommended methods of using the module:

With the CLI

The easiest way to use it is with the CLI. In the directory where yourwebpack.config.js is, run:

node_modules/.bin/webpack-dev-server

With NPM Scripts

NPM 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:dev

NPM will automagically reference the binary innode_modules for you, andexecute the file or command.

The Result

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.

Browser Support

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.

Support

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.

Contributing

We welcome your contributions! Please have a read ofCONTRIBUTING.md for more information on how to get involved.

Maintainers


Kees Kluskens

Andrew Powell

Attribution

This project is heavily inspired bypeerigon/nof5.

License


[8]ページ先頭

©2009-2025 Movatter.jp