Node-minify gets stuck at Done! without exiting
iansan5653 opened this issue · 4 comments
I have node-minify as part of a prepublish task in my package.json, and up until recently it worked great.
Now, the minifier doesn't exit so I can't continue with the publish task. It just freezes with the following output without ending its process:
> node-minify --compressor uglify-es --input dist/index.js --output dist/index.min.js && node-minify --compressor uglify-es --input dist/errors.js --output dist/errors.min.js
INFO Starting compression...
√ File(s) compressed successfully with uglify-es (1.93 kB minified, 825 B gzipped)
DONE Done!
Are you using the latest version of node-minify (5.2.0) ?
I tried your example and it's working fine.
Or maybe can you explain more about your publish task in order to reproduce it ?
Here's a reproducible example:
package.json
{
"scripts": {
"minify": "node-minify --compressor uglify-es --input index.js --output index.min.js"
},
"dependencies": {
"@node-minify/cli": "^5.2.0",
"@node-minify/core": "^5.2.0",
"@node-minify/uglify-es": "^5.2.0"
}
}
index.js is just a blank file.
Running npm run minify
in this directory causes the minification to complete successfully, but the process never exits. It leaves a screen looking like this:
(What I would expect in the above screenshot is for the command input prompt to appear again.)
I tried this in Powershell, CMD, and Git Bash, so it's definitely not a terminal problem.
I've released 5.2.1
with a fix on @node-minify/cli
npm i @node-minify/cli@5.2.1
Confirmed it's fixed, thanks!