-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Option to disable serveIndex middleware #1745
Comments
@jamesknelson PR welcome 👍 |
hello I want to work on this feature
the new code will be
instead of directory listing the files in folders without so am I getting it right? excuse me I'm new to WebPack. |
Look on other options and just send a PR |
@evilebottnawi I added the new option and I tested it on one of the examples in the |
@EslamHiko we don't add this feature https://github.com/webpack/webpack-dev-server/blob/master/lib/Server.js#L555 if |
Fixed #1752 |
Code
It'd be useful to be able to disable the express serve-index middleware, which generates directory listings when you view a directory that doesn't have an index.html file.
For Features; What is the motivation and/or use-case for the feature?
This option is required to be able to do SSR for the root page with webpack-dev-server in an
after()
middleware using theserverSideRender
option, as otherwise an automatically-generated index page will be shown instead.I'd be happy to put a PR together for this change if it's likely to be accepted.
The text was updated successfully, but these errors were encountered: