CLI node-minify --option : json error
vykimo opened this issue · 1 comments
vykimo commented
Hello,
When I'm setting 'minify' in my package.json
:
"minify": "node-minify --compressor terser --input ./main.js --output ./main.js --option '{ \"compress\": { \"drop_console\": true } }'",
I get following error for option :
INFO Starting compression...
SyntaxError: Unexpected token ' in JSON at position 0
Note that without option, it's working well.
vykimo commented
Found the solution :
Need to triple \\ for double quote like that :
--option {\\\"compress\\\":{\\\"drop_console\\\":true}}