-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue on update to 1.0.0 #27
Comments
I'm seeing this issue as well, using version 1.0.0 on both Windows and Linux. The call to mangled = uglify.minify(String(file.contents), uglifyOptions);
min_file.contents = new Buffer(mangled.code.replace(reSourceMapComment, '')); (taken from https://github.com/hustxiaoc/gulp-minify/blob/1.0.0/index.js#L119-L120). The error that is returned from
I'm using the following versions:
|
This issue is related to #29 - the underlying error from |
One more bit of context relating to the issue above - running |
I said:
... but I'm afraid this is incorrect: I think the underlying error is in var uglify = require('uglify-es');
var mangled = uglify.minify(''
+ 'var a;'
+ '(function () { })(a = {});'
+ 'var a;'
);
console.log(mangled.error); This still exhibits the error but does not have any dependencies on The above construct looks odd, but it comes about when using TypeScript namespaces across multiple separate files that are then concatenated together. I don't know if this is the cause of the issue @CrackerakiUA originally reported. I guess there are a couple of potential improvements that might be helpful for this project:
Running |
I am not using TypeScript, but i guess it could be if one of the libs i am trying to minify use it. Also i agree very much with your second suggestion. |
I think idea 2 above is going to become more important:
From https://github.com/mishoo/UglifyJS2:
From https://github.com/mishoo/UglifyJS2/tree/harmony:
Updating to |
Hi, sorry for the trouble. I've created a new tag |
Cool - thanks very much. @CrackerakiUA does this fix your issue? |
Yes |
I also encountered this issue, it came out to be the problem of mismatch of parentheses. |
After update to 1.0.0 i get below error. I use your module inside mine.
The text was updated successfully, but these errors were encountered: