Skip to content

Conversation

@wardpeet
Copy link
Collaborator

Summary
I'm replacing uglify-es with terser to minify our viewer.js. Terser has been the successor to uglify-es as it's not actively maintained anymore.

Related Issues/PRs
Fixes #9558

@connorjclark
Copy link
Collaborator

async/await will work now, yes?

don't change anything yet - I don't want conflicts w/ my viewer changes. one of use could follow up later and async/await the things here. just wanna ensure it works now :)

Copy link
Collaborator Author

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it will, it should have all es7-8 features.

Copy link
Contributor

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @wardpeet!

@brendankenny
Copy link
Contributor

The one issue I see is the output isn't in strict mode since it no longer has a "use strict"; directive at the top. Is there any way to get terser to output that? I guess at worst we could add it to the preamble :/

@connorjclark
Copy link
Collaborator

The one issue I see is the output isn't in strict mode since it no longer has a "use strict"; directive at the top. Is there any way to get terser to output that? I guess at worst we could add it to the preamble :/

not seeing a way to get use strict in the toplevel for terser, but it still has use strict in various other parts of the minified code.

@wardpeet
Copy link
Collaborator Author

good catch @brendankenny, i've added the "use-strict"; pragma again.

@brendankenny
Copy link
Contributor

good catch @brendankenny, i've added the "use-strict"; pragma again.

ah, nice fix :)

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patrickhulce patrickhulce merged commit cde97a5 into GoogleChrome:master Aug 23, 2019
@wardpeet wardpeet deleted the feat/terser branch September 3, 2019 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support async/await in viewer

5 participants