This is a DDEV addon to run Unlighthouse in your site. Unlighthouse is a tool to scan your entire site with Google Lighthouse in 2 minutes (on average).
This is optimized for Aljibe projects, but can be used in any DDEV project.
Install this addon:
For DDEV v1.23.5 or above run
ddev add-on get Metadrop/ddev-unlighthouseFor earlier versions of DDEV run
ddev get Metadrop/ddev-unlighthouseOnce installed, make sure to restart your ddev project:
ddev restartThis addon uses the tests/[local|pro|....]/unlighthouse.ts configuration file to customize tests according to your needs. You can modify this file following Unlighthouse configuration guidelines.
To execute unlighthouse tests, simply access your ddev environment and run any of this commands:
unlighthouse: Run tests and browse them live athttps://$DDEV_HOSTNAME:5678unlighthouse-ci: Run tests and generate a static report inreports/unlighthousefolder
ddev [unlighthouse|unlighthouse-ci] <folder>[local|pre|pro...]
Because of CORS restrictions, reports must be accessed via an HTTP server. To do this, you need to adjust the unlighthouse configuration and provide ddev's URL. See unlighthouse/unlighthouse.ts for reference.
Once unlighthouse reports are generated, you can review them to identify areas for improvement in performance, accessibility, and more of your website.
Happy optimization!
Contributed and maintained by @Metadrop