Skip to content

Commit

Permalink
disable removeRedundantAttributes flag in html-minifier (fix vue-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 31, 2015
1 parent 253b71d commit 6739997
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
Authors Tobias Koppers @sokra, Evan You @yyx990803
*/
var htmlMinifier = require("html-minifier");
var attrParse = require("./lib/attributesParser");
Expand Down Expand Up @@ -61,10 +61,12 @@ module.exports = function(content) {
collapseWhitespace: query.collapseWhitespace !== false,
collapseBooleanAttributes: query.collapseBooleanAttributes !== false,
removeAttributeQuotes: query.removeAttributeQuotes !== false,
removeRedundantAttributes: query.removeRedundantAttributes !== false,
useShortDoctype: query.useShortDoctype !== false,
removeEmptyAttributes: query.removeEmptyAttributes !== false,
removeOptionalTags: query.removeOptionalTags !== false,
// this flag remove "type" in <input type="text">, and is only enabled
// when the user explicitly wants it.
removeRedundantAttributes: !!query.removeRedundantAttributes,
// required for Vue 1.0 shorthand syntax
customAttrSurround: [[/@/, new RegExp('')], [/:/, new RegExp('')]]
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"author": "Tobias Koppers @sokra",
"description": "html loader module for webpack",
"dependencies": {
"html-minifier": "^0.8.0",
"source-map": "^0.5.1",
"html-minifier": "^1.0.0",
"source-map": "^0.5.3",
"fastparse": "^1.1.1",
"loader-utils": "^0.2.11"
},
Expand Down

0 comments on commit 6739997

Please sign in to comment.