Skip to content

Commit

Permalink
bugfix: fix html minify when images exist in build entry
Browse files Browse the repository at this point in the history
  • Loading branch information
soda-x committed Jul 14, 2015
1 parent 23866fd commit 681d1d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/SPMPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function copyFile(file, destFile, destDir, cwd, fs, htmlMnify) {
} else {
require('mkdirp')(dirname(target));
}
var oriFile = htmlMnify ? minify(_fs.readFileSync(ori, 'utf8'), {
var oriFile = htmlMnify && /\.(htm|html)$/.test(ori) ? minify(_fs.readFileSync(ori, 'utf8'), {
removeComments: true,
removeCommentsFromCDATA: true,
collapseWhitespace: true,
Expand Down

0 comments on commit 681d1d1

Please sign in to comment.