- Operating System: Mac OS 10.14.3
- Node Version: 11.1.0
- NPM Version: 6.7.0
- webpack Version: 4.29.6
- webpack-dev-server Version: 3.2.1
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.
// webpack.config.js
module.exports = {
// ...
devServer: {
serveIndex: false,
}
}
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 the serverSideRender 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.
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 theserverSideRenderoption, 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.