diff --git a/README.md b/README.md index 7aa22eb4..49296c47 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,38 @@ module: { } ``` +The enabled rules for minimizing by default are the following ones: + - removeComments + - removeCommentsFromCDATA + - removeCDATASectionsFromCDATA + - collapseWhitespace + - conservativeCollapse + - removeAttributeQuotes + - useShortDoctype + - keepClosingSlash + - minifyJS + - minifyCSS + - removeScriptTypeAttributes + - removeStyleTypeAttributes + + The rules can be disabled using the following options in your `webpack.conf.js` + +```js +module: { + rules: [{ + test: /\.html$/, + use: [ { + loader: 'html-loader', + options: { + minimize: true, + removeComments: false, + collapseWhitespace: false + } + }], + }] +} +``` + ### 'Root-relative' URLs For urls that start with a `/`, the default behavior is to not translate them. diff --git a/test/loaderTest.js b/test/loaderTest.js index a353ed46..285fdfd6 100644 --- a/test/loaderTest.js +++ b/test/loaderTest.js @@ -57,6 +57,35 @@ describe("loader", function() { 'module.exports = "
{title}
{title}
{title}
{title}
{title}