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

output Json #4

Closed
pedro93 opened this issue Jan 23, 2017 · 2 comments
Closed

output Json #4

pedro93 opened this issue Jan 23, 2017 · 2 comments

Comments

@pedro93
Copy link

pedro93 commented Jan 23, 2017

Hello,

I am investigating how to run performance audits locally with lighthouse and allow for performance budgets much like what webpack does with size budgets but giving the power to the user.

I am aware that running performance audits in a "dev environment" is less than ideal but this would be a first opt-in perf indicator and a tool to be improved upon.

The first step to doing this would be by retrieving the lighthouse results in JSON format and then evaluate them against user defined values.

Lighthouse as a standalone already enables JSON outputs but I am unable to retrieve those values from this plugin. Is it possible and an adequate functionality for this plugin?

Thanks for reading and for this OSS work :)

@pedro93
Copy link
Author

pedro93 commented Jan 24, 2017

After reading a through a few lighthouse issues I found the following issue:
GoogleChrome/lighthouse#1176 (comment)

Which would simply the code for this repository and enabled the output json flags (amongst others). If you feel so inclined I could make a PR as a proof-of-concept.
What are your thoughts on this? I realize webpack as a primarily module bundler may not make since for this kind of work.

@evenstensberg
Copy link
Collaborator

evenstensberg commented Sep 24, 2017

Hi @pedro93 !

const WebpackLighthousePlugin = require('webpack-lighthouse-plugin');

new WebpackLighthousePlugin({
   url: 'https://google.com/',
   output: 'json'
}),

should be sufficient after #7, please comment if it didn't address your issue correctly. Cheers 🍀

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

No branches or pull requests

2 participants