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

Suggestion: Improve docs to add 'offline' stack packs; build your own stack pack and recommendations #92

Open
pedddro opened this issue Apr 12, 2023 · 5 comments

Comments

@pedddro
Copy link

pedddro commented Apr 12, 2023

Improve docs to add a section of 'offline' stack packs where you can create your own plugin but not necessarily needs to be added to Lighthouse.

@paulirish
Copy link
Member

Hmmm Whats the end result you'd want?

Everyone in your company/team can see your specific additions when they view the rendered report?

@pedddro
Copy link
Author

pedddro commented Apr 13, 2023

Hmmm Whats the end result you'd want?

Everyone in your company/team can see your specific additions when they view the rendered report?

stack packs look easier than fork Lighthouse and create your own recommendations or lighthouse plugins. For example, I will create a stack pack that detects a JS code that loads all js after user interaction which may affect negatively INTP(CWV metric).

Maybe not name it stack pack, but stacks that don't need to be added to Lighthouse; people will be free to create their own recommendations.

@pedddro
Copy link
Author

pedddro commented Dec 15, 2023

I think a more complete idea is to allow community stack packs to be run with flags and we could have more diagnostics for technologies.

An example is Wordpress loads an emoji script(wp-emoji-release.min.js) that many people don't need. A community Wordpress stack pack to remove it can be made, which wouldn't be dependent on the main WP stack pack.

@connorjclark
Copy link
Collaborator

connorjclark commented Dec 15, 2023

Stack packs were designed for this:

  1. Given a detected JS library/framework on the page...
  2. ...augment specified audits with additional strings, where library-specific advice can be given

They aren't designed to do the detection themselves. For that, Lighthouse uses https://github.com/johnmichel/Library-Detector-for-Chrome . There is no mechanism to detect from a stack-pack implementation anything other than what comes from that. It's just a bag of strings.

Given:

For example, I will create a stack pack that detects a JS code that loads all js after user interaction which may affect negatively INTP(CWV metric).

This seems like a custom audit, so we'd point you to Lighthouse plugins.

I think a more complete idea is to allow community stack packs to be run with flags and we could have more diagnostics for technologies.

An example is Wordpress loads an emoji script(wp-emoji-release.min.js) that many people don't need. A community Wordpress stack pack to remove it can be made, which wouldn't be dependent on the main WP stack pack.

Can you explain how this differs from Lighthouse plugins, which can be distributed via npm and work today?

@pedddro
Copy link
Author

pedddro commented Dec 15, 2023

Can you explain how this differs from Lighthouse plugins, which can be distributed via npm and work today?

The difference is implementation, I can create a stack pack with 1 PR, while the plugin seems more than that, also UX-wise as the results will appear in the performance audit.

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

3 participants