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
Minification should remove HTML comments. Changing loaderTest.js test "should minimize" to look like this:
loaderTest.js
"should minimize"
'<!-- comment --><h3>#{number} {customer}</h3>\n<p> {title} </p>\n\t <!-- comment --> <img src="image.png" />'
Should still produce the same result.
I've made this modification on the test:
diff --git a/test/loaderTest.js b/test/loaderTest.js index f2fd67f..66978f5 100644 --- a/test/loaderTest.js +++ b/test/loaderTest.js @@ -37,8 +37,8 @@ describe("loader", function() { it("should minimize", function() { loader.call({ minimize: true - }, '<h3>#{number} {customer}</h3>\n<p> {title} </p>\n\t<img src="image.png" />').should.be.eql( + }, '<!-- comment --><h3>#{number} {customer}</h3>\n<p> {title} </p>\n\t <!-- comment --> <img src="image.png" />').should.be.eql( 'module.exports = "<h3>#{number} {customer}</h3><p>{title}</p><img src=" + require("./image.png") + ">";' ); }); -}); \ No newline at end of file +});
After running mocha I get this error:
mocha
1) loader should minimize: AssertionError: expected 'module.exports = "<!-- comment --><h3>#{number} {customer}</h3><p>{title}</p><!-- comment --><img src=" + require("./image.png") + ">";' to equal 'module.exports = "<h3>#{number} {customer}</h3><p>{title}</p><img src=" + require("./image.png") + ">";' + expected - actual +"module.exports = \"<h3>#{number} {customer}</h3><p>{title}</p><img src=\" + require(\"./image.png\") + \">\";" -"module.exports = \"<!-- comment --><h3>#{number} {customer}</h3><p>{title}</p><!-- comment --><img src=\" + require(\"./image.png\") + \">\";" at Assertion.prop.(anonymous function) (/home/fernando/work/github/webpack/html-loader/node_modules/should/lib/should.js:60:14) at Context.<anonymous> (/home/fernando/work/github/webpack/html-loader/test/loaderTest.js:40:132) at Test.Runnable.run (/usr/lib/node_modules/mocha/lib/runnable.js:221:32) at Runner.runTest (/usr/lib/node_modules/mocha/lib/runner.js:374:10) at /usr/lib/node_modules/mocha/lib/runner.js:452:12 at next (/usr/lib/node_modules/mocha/lib/runner.js:299:14) at /usr/lib/node_modules/mocha/lib/runner.js:309:7 at next (/usr/lib/node_modules/mocha/lib/runner.js:247:23) at Object._onImmediate (/usr/lib/node_modules/mocha/lib/runner.js:276:5) at processImmediate [as _immediateCallback] (timers.js:330:15)
I couldn't find a configuration option to activate HTML comment removal.
The text was updated successfully, but these errors were encountered:
fixed in b766158
Sorry, something went wrong.
Fix confirmed. Thanks.
No branches or pull requests
Minification should remove HTML comments. Changing
loaderTest.js
test"should minimize"
to look like this:Should still produce the same result.
I've made this modification on the test:
After running
mocha
I get this error:I couldn't find a configuration option to activate HTML comment removal.
The text was updated successfully, but these errors were encountered: