Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/webpack-dev-server serves directory listing instead of application #131

Closed
ivan opened this issue Mar 14, 2015 · 2 comments
Closed

/webpack-dev-server serves directory listing instead of application #131

ivan opened this issue Mar 14, 2015 · 2 comments

Comments

@ivan
Copy link

ivan commented Mar 14, 2015

http://webpack.github.io/docs/webpack-dev-server.html#hot-mode-with-indication tells me to navigate to localhost:8080/webpack-dev-server, but that URL serves me a very sparse directory listing instead of my application. I have to add a trailing slash and navigate to localhost:8080/webpack-dev-server/ instead to see my application.

Not sure if the docs need to be fixed, or if the slash-free path needs to redirect.

@ivan ivan changed the title /webpack-dev-server serves index instead of application /webpack-dev-server serves directory listing instead of application Mar 14, 2015
@sokra
Copy link
Member

sokra commented Mar 14, 2015

Docs need to be fixed...

@sokra sokra closed this as completed Mar 25, 2015
@jasonlam-swatow
Copy link

Say you wanted to render the index.html under /public in the first place.

Try add configs below into your webpack.config.js:

devServer: {
    contentBase: "./public",
    hot: true
},

And it shall work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants