coderaiser / minify

Minifier of js, css, html and img
https://coderaiser.github.io/minify
MIT License
228 stars 29 forks source link

Latest version (3.0.3) fails with syntax error #46

Closed aw closed 6 years ago

aw commented 6 years ago

I didn't notice the major version update from 2.x to 3.x, and now it seems to break on an existing project (using minify v3.0.3):

$ minify file.js
../node_modules/minify/bin/minify.js:9
const log = (...args) => {
             ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:140:18)
    at node.js:1043:3

I reverted the module to v2.1.8 and that same command works fine.

NodeJS version: v4.8.7

coderaiser commented 6 years ago

Thank you :). Landed in v3.0.4