Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

0.31 and 0.32 releases are broken by UglifyJS 3.X #120

Closed
ddemid opened this issue Aug 22, 2018 · 2 comments
Closed

0.31 and 0.32 releases are broken by UglifyJS 3.X #120

ddemid opened this issue Aug 22, 2018 · 2 comments

Comments

@ddemid
Copy link
Contributor

ddemid commented Aug 22, 2018

It silently fails to minify the js and uploads empty file to s3.

Since 0.31 you've upgraded to uglifyjs 3.X in package.json, which is being incorrectly used.

var final_code = uglify.minify(results, { fromString: true, output: { comments: /license/ } }).code;

gives undefined as a result. And since you aren't checking the error property, it fails silently.

The real error message is:

"fromString" is not a supported option node

@ddemid
Copy link
Contributor Author

ddemid commented Aug 22, 2018

I've added a PR #121

@niftylettuce
Copy link
Collaborator

thanks @ddemid - I have deprecated v0.3.1 and v0.3.2 with the message Please upgrade to v0.3.3+ as this version is broken, see https://github.com/niftylettuce/express-cdn/issues/120, and published v0.3.3

please npm install express-cdn@latest or yarn add express-cdn@latest.

appreciate your PR and bug finding.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants