We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Having foo.js with contents:
foo.js
export default function Foo() { console.info("Foo") } Foo.prototype.bar = function() { console.info("bar") }
Produces invalid minified output:
$ minify foo.js export default function(){console.info("Foo")}Foo.prototype.bar=function(){console.info("bar")}
Problem is that function name Foo will be stripped and after that Foo.prototype.bar will throw an error.
Foo
Foo.prototype.bar
minify should not break JS like this.
minify
Currently a work-around is to change foo.js into the following:
function Foo() { console.info("Foo") } Foo.prototype.bar = function() { console.info("bar") } export default Foo
Then everything works as expected:
$ minify foo.js function Foo(){console.info("Foo")}Foo.prototype.bar=function(){console.info("bar")};export default Foo
The text was updated successfully, but these errors were encountered:
2d24fc4
Thanks, should be fixed now!
Sorry, something went wrong.
No branches or pull requests
Having
foo.js
with contents:Produces invalid minified output:
Problem is that function name
Foo
will be stripped and after thatFoo.prototype.bar
will throw an error.minify
should not break JS like this.Currently a work-around is to change
foo.js
into the following:Then everything works as expected:
The text was updated successfully, but these errors were encountered: