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

Having source maps in production is not a best practice. Then why the error? #16104

Closed
3 tasks done
alex-vukov opened this issue Jul 8, 2024 · 1 comment
Closed
3 tasks done

Comments

@alex-vukov
Copy link

FAQ

URL

www.google.com

What happened?

Whenever I test a website with Lighthouse I always see this error Missing source maps for large first-party JavaScript. It is a common (and best) practice not to enable source maps on production for security reasons. Why is this message always shown as an error under Best Practices?

What did you expect?

I expect not to see this error because source maps should only be enabled on internal and test websites

What have you tried?

No response

How were you running Lighthouse?

Chrome DevTools

Lighthouse Version

12.0.0

Chrome Version

126.0.6478.127

Node Version

No response

OS

MacOS

Relevant log output

No response

@adamraine
Copy link
Member

adamraine commented Aug 12, 2024

Valid source maps are only encouraged to provide Lighthouse with more detailed information to give better advice. If you prefer not to expose source maps in production environments that's fine (although - it is still possible and very encouraged to figure out how to allow source maps in production to just authenticated clients, which would allow Lighthouse to see it from DevTools).

The source maps audit is not actually scored so will not affect your best practices score.

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

4 participants