$ npm install
$ ./node_modules/.bin/webpack-dev-server
$ open http://localhost:8080/webpack-dev-server/
Notes:
- Note the trailing slash on the URL is significant. Without it webpack-dev-server shows a file listing page.
- You need 1.0.11 or later of webpack-dev-middleware for this URL to work. With earlier versions you need to specify the full URL like this:
http://localhost:8080/webpack-dev-server/index.html
. - To get a non-autoreloading version of the page use
http://localhost:8080/index.html
.
@JacobWay @dietergeerts and others - it seems like it can be fixed by the
template
option of the html-webpack-plugin. Like example below.