Skip to content
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

screw_ie8 in Node.js 6.3.1 #1246

Closed
rostik404 opened this issue Aug 4, 2016 · 5 comments
Closed

screw_ie8 in Node.js 6.3.1 #1246

rostik404 opened this issue Aug 4, 2016 · 5 comments

Comments

@rostik404
Copy link

screw_ie8 option doesn't work in Node.js 6.3.1. When I use it, I'm getting error: screw_ie8 is not a supported option

@avdg
Copy link
Contributor

avdg commented Aug 4, 2016

Make sure you passed the option under beautify settings

@eGavr
Copy link

eGavr commented Aug 4, 2016

@avdg

Please, сan you provide an example? How should I pass this option?

I do this way:

{ 
    compress: {screw_ie8: false},
    mangle: {screw_ie8: false}, 
    output: {screw_ie8: false}
}

This works for ie8 and in node@4.x fine, but fails in node@6.x :(

@kzc
Copy link
Contributor

kzc commented Aug 4, 2016

Just verified it works correctly with node 6.3.1.

$ cat min.js
var flag = process.argv[2];
var screw_ie8 = flag === undefined ? true : JSON.parse(flag);
console.log("// screw_ie8 =", screw_ie8);
var src = "console.log({var:'\v'});";
console.log(require("uglify-js").minify(src, {
    fromString: true,
    compress: { screw_ie8: screw_ie8 },
    mangle:   { screw_ie8: screw_ie8 },
    output:   { screw_ie8: screw_ie8 },
}).code);

$ uglifyjs -V
uglify-js 2.7.0

$ node -v
v6.3.1

$ node ./min.js true
// screw_ie8 = true
console.log({var:"\v"});

$ node ./min.js false
// screw_ie8 = false
console.log({"var":"\x0B"});

Also verified against node 0.10.x, 0.12.x, node 4.x and node 5.x.

See also: #1213 (comment) and #1201 (comment)

@avdg
Copy link
Contributor

avdg commented Aug 4, 2016

oh yeah, there are multiple settings with ie8 :/

And kzc knows better than me.

@rostik404
Copy link
Author

I had this problem in uglify-js 2.3.6.
In new version everything is ok.

Thank you! 😊

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

No branches or pull requests

4 participants