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

chore(lighthouse-viewer): replace deprecated uglify-es with terser #9594

Merged
merged 6 commits into from
Aug 23, 2019

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

build/build-viewer.js Outdated Show resolved Hide resolved
@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
Member

@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!

build/build-viewer.js Outdated Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
build/build-viewer.js Outdated Show resolved Hide resolved
@brendankenny
Copy link
Member

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
Member

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

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