Skip to content

Export lighthouse report renderer as a standalone ES Module #10926

@dvelasquez

Description

@dvelasquez

Feature request summary

Export the lighthouse-viewer code as a standalone ES Module, so we can easily integrate it in other types of projects.
For the moment I have some automated script that copies the files from lighthouse/lighthouse-core/report/html, and replace some parts of the code to make it ES Modules compatible. Then all the internals are exported as ES Modules, so whoever is interested can use it as is, or create a wrapper, like this: https://github.com/dvelasquez/lighthouse-viewer/tree/master/packages/vue-lighthouse-viewer

Yes I'm willing to work on this, I just need to know what would be the best way to export this. In this repository.

  • Should I create a custom NPM script to generate this?
  • Should we move the code to a different repository?

I'm willing to, if needed, to rewrite the code in TypeScript too.

What is the motivation or use case for changing this?
Many of us are using lighthouse to evaluate pages in bulk, and we would like to explore the results and recommendations and also keep the code up to date whenever lighthouse updates itself.

How is this beneficial to Lighthouse?
This gives a clear access to the features of lighthouse (like the viewer) to other developers, removing the hassle of copying manually the source code and get outdated whenever a new version of lighthouse came, eg: react-lighthouse-viewer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions