Skip to content

UglifyJS.minify undefined in --self build #1223

@nha

Description

@nha

After building uglifyjs --self from master, I call UglifyJS.minify and get an exception that minify is undefined.

I was expecting to have it defined as a function, like parse in this test:

https://github.com/mishoo/UglifyJS2/blob/debc525fa117438d4971df3790f9f476fed65858/test/mocha/cli.js#L17
But if I try to call WrappedUglifyJS.minify("var a = 3;", {fromString: true});, it seems minify is undefined.

Note: I get the same result using only the --self flag.

Not sure if this is a bug or a misunderstanding on my end about --self (and if so, is there a workaround ?) since this seems to have been the case for a few versions back.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions