We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Change Request : the serveIndex currently accepts icons. WebpackDevServer would be a nicer app if icons were visible by default.
Yes it is very minor.
The text was updated successfully, but these errors were encountered:
Do you want setup own icons or we should setup default icon?
Sorry, something went wrong.
Just adding {icons:true} to serveIndex.
{icons:true}
Here is the code change I would suggest in the lib/Server.js:
lib/Server.js
setupServeIndexFeature() { const contentBase = this.options.contentBase; const contentBasePublicPath = this.options.contentBasePublicPath; if (Array.isArray(contentBase)) { contentBase.forEach((item) => { this.app.use(contentBasePublicPath, (req, res, next) => { // serve-index doesn't fallthrough non-get/head request to next middleware if (req.method !== 'GET' && req.method !== 'HEAD') { return next(); } serveIndex(item, { icons: true })(req, res, next); }); }); } else if ( typeof contentBase !== 'number' && !isAbsoluteUrl(String(contentBase)) ) { this.app.use(contentBasePublicPath, (req, res, next) => { // serve-index doesn't fallthrough non-get/head request to next middleware if (req.method !== 'GET' && req.method !== 'HEAD') { return next(); } serveIndex(contentBase, { icons: true })(req, res, next); }); } }
Solved
No branches or pull requests
Change Request :
the serveIndex currently accepts icons. WebpackDevServer would be a nicer app if icons were visible by default.
Yes it is very minor.
The text was updated successfully, but these errors were encountered: