Skip to content

Commit

Permalink
Integrate with webpack#355
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoitch committed Jan 4, 2019
1 parent 61cf896 commit 5fd4489
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ module.exports = function wrapper(context) {
let contentType = mime.getType(filename) || '';
const mimeInfo = mimeDb[contentType];
const charset = (mimeInfo && mimeInfo.charset)
// Special-cased text/html to prevent possible breaking change.
// Special-cased text/html & empty to prevent possible breaking change.
// TODO: remove the following line in next major release.
|| (contentType === 'text/html' && 'UTF-8');
|| ((contentType === 'text/html' || !contentType) && 'UTF-8');

if (charset) {
contentType += `; charset=${charset}`;
Expand Down

0 comments on commit 5fd4489

Please sign in to comment.