philhawksworth / netlify-plugin-minify-html

26 stars 8 forks source link

This fails on directories ending with `*.html` #6

Open ehmicky opened 4 years ago

ehmicky commented 4 years ago

The following build error seems to happen:

The Minify HTML plugin failed.
EISDIR: illegal operation on a directory, read 
    fs.js:524:3 Object.readSync
    fs.js:349:20 tryReadSync
    fs.js:386:19 Object.readFileSync
    /opt/build/repo/node_modules/@node-minify/utils/lib/utils.js:196:24 Object.utils.getContentFromFiles
    /opt/build/repo/node_modules/@node-minify/core/lib/compress.js:74:34 
    /opt/build/repo/node_modules/@node-minify/core/lib/compress.js:73:18 compressArrayOfFilesAsync
    /opt/build/repo/node_modules/@node-minify/core/lib/compress.js:39:65 compress
    /opt/build/repo/node_modules/@node-minify/core/lib/core.js:30:7 

Link to full logs.

I think this might be because node-minify input argument globbing expression must only match regular files and not directories, and a user has a *.html directory? I am not sure.

chrispecoraro commented 2 years ago

Yes, I submitted a fix for this a long time ago, so still waiting for this plugin to upgrade their package dependency: https://github.com/srod/node-minify/pull/1117