coderaiser/minify

BUG: After release v11.1.1, all HTML files are exported completelly in blank

Closed this issue · 3 comments

I'm minimizing my HTML files using npx minify --auto index.html > ./output/index.html. It was working on version 11.0.1.

My minify.json file is the following:

{
    "js": {
        "mangle": true,
        "mangleClassNames": true,
        "removeUnusedVariables": true,
        "removeConsole": false,
        "removeUselessSpread": true
    },
    "img": {
        "maxSize": 4096
    },
    "html": {
        "removeComments": true,
        "removeCommentsFromCDATA": true,
        "removeCDATASectionsFromCDATA": true,
        "collapseWhitespace": true,
        "collapseBooleanAttributes": true,
        "removeAttributeQuotes": false,
        "removeRedundantAttributes": true,
        "useShortDoctype": true,
        "removeEmptyAttributes": true,
        "removeEmptyElements": false,
        "removeOptionalTags": false,
        "removeScriptTypeAttributes": false,
        "removeStyleLinkTypeAttributes": true,
        "minifyJS": true,
        "minifyCSS": true
    },
    "css": {
        "compatibility": "*"
    }
}

After upgrading to 11.1.1, HTML files are exported completely in blank, CSS and JS files keept the same.

I cannot reproduce this:
image

Please re-install Minify and try again, is it works for you?

Okay, I've tested a little more:

Using it like cat index.html | npx minify --html > teste.html works.

But using it like below doesn't work:

  • npx minify --html index.html
  • npx minify --html index.html > test.html

I'm using a mac with ARM processor, but it also haven't worked on Github Actions.

And booth, the v11.0.1 and v11.1.1 (the booth I've tested) aren't working.

cat index.html | npx minify --html > teste.html

this is documented and correct way, to read stream and understand what type of file is piped. If you pass file as argument to Minify flag —-html not needed, type determined by file extension.