Package Exports
- webpack-dev-server
- webpack-dev-server/bin/webpack-dev-server
- webpack-dev-server/bin/webpack-dev-server.js
- webpack-dev-server/client/live.bundle.js
- webpack-dev-server/client/live.html
- webpack-dev-server/lib/Server
- webpack-dev-server/package.json
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webpack-dev-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
webpack-dev-server
THIS SERVER SHOULD ONLY USED FOR DEVELOPMENT!
DO NOT USE IT IN PRODUCTION!
What is it?
It's a little server using webpack-dev-middleware to serve a webpack app.
It also uses socket.io to update the browser if the bundle has changed (and to display compilation errors).
You need to pass webpack's options, and you can also pass a html page to display and webpack options.
Inspiration
This project is heavily inspirated by peerigon/nof5.
Usage (command line)
Like webpack, but you omit the output filename.
Usage (javascript)
var Server = require("webpack-dev-server");
var options = {
content: absoluteFilenameToContentHtmlPage,
// Content page to display
// it will default to a simple page
contentUrl: "http://...",
// if set it will load this URL as content page
// it will default to undefined
// webpack-dev-middleware options
// you can use all options of the middleware
webpack: {
// webpack options
// ...
output: {
filename: "bundle.js"
// use "bundle.js" as filename if you don't provide a own content page
}
}
};
new Server(webpack(/*...*/), options).listen(port[, host]);
Contributing
The client scripts are build with npm run-script prepublish
.
Lisence
Copyright 2012-2013 Tobias Koppers