You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For developing applications with pages that don't have a file extension. E.g. localhost:8080/example. It would be convenient to be able to specify a default mime-type for files that don't have a file extension; specifically, 'text/html'.
Current State
The express server will emit this content type as application/octet-stream even though middleware goes out of it's way to avoid inappropriately setting a mime-type at middleware.js#L104-L113. Express uses mime 1.6 which eventually fills in a default type at mine.js#L69-L73 The result being there is a default content type, and it's determined further down in the stack.
In production deployment this is not a problem. Configuring production web servers to emit the desired mime type, re-writing the requests, or specifying the mime-type in metadata makes this not a production issue.
Please paste the results of npx webpack-cli info here, and mention other relevant information
Feature Proposal
Configuration option to set default mime-type
Stack overflow issue detailing the context in which this use case arose: https://stackoverflow.com/questions/70011373/how-to-configure-webpack-dev-server-to-serve-extensionless-files-as-text-html
Feature Use Case
For developing applications with pages that don't have a file extension. E.g. localhost:8080/example. It would be convenient to be able to specify a default mime-type for files that don't have a file extension; specifically, 'text/html'.
Current State
The express server will emit this content type as
application/octet-stream
even though middleware goes out of it's way to avoid inappropriately setting a mime-type at middleware.js#L104-L113. Express uses mime 1.6 which eventually fills in a default type at mine.js#L69-L73 The result being there is a default content type, and it's determined further down in the stack.In production deployment this is not a problem. Configuring production web servers to emit the desired mime type, re-writing the requests, or specifying the mime-type in metadata makes this not a production issue.
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: