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

amp-date-picker not properly minified due to copyright notice #17077

Closed
RonnieWinter opened this issue Jul 25, 2018 · 2 comments
Closed

amp-date-picker not properly minified due to copyright notice #17077

RonnieWinter opened this issue Jul 25, 2018 · 2 comments

Comments

@RonnieWinter
Copy link

RonnieWinter commented Jul 25, 2018

What's the issue?

When we run lighthouse tests against our AMP pages amp-date-picker-0.1.js is being flagged as not being minified. I have checked https://cdn.ampproject.org/v0/amp-date-picker-0.1.js and it actually does look like it is minified except for the copyright notice which includes whitespace and new lines. I have checked the .js files for other components such as amp-list and amp-form and I see that they do not have a copyright notice and are therefore properly minified.

So would it be possible to remove/minify the copyright notice from the amp-date-picker-0.1.js file so that it can actually be considered as minified javascript?

screen shot 2018-07-25 at 11 26 51

screen shot 2018-07-25 at 11 26 17

@jpettitt
Copy link
Contributor

jpettitt commented Jul 25, 2018

The copyright notice is required by the license of the underlying code and cannot be removed. Other modules do not include third party code and so do not have the same requirement. This is a misdetection by lighthouse.

@patrickhulce
Copy link

For the record, this was indeed a bug with Lighthouse's JS parser, esprima. LH is 1000% onboard with keeping copyright notices in code :)

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

No branches or pull requests

3 participants