Skip to main content
Recipes

Scanning Single Page Applications

Lighthouse audits application pages in Chrome. The discovery crawler reads server-rendered HTML and does not execute JavaScript.

Supply routes

Use a sitemap or explicit URLs when navigation links appear only after hydration.

import { defineUnlighthouseConfig } from 'unlighthouse/config'

export default defineUnlighthouseConfig({
  site: 'http://localhost:3000',
  urls: ['/', '/about', '/products'],
})

Each URL must load the application directly. Configure your server to return the application shell for those paths.

Legacy browser discovery

--enable-javascript does not enable browser-based link discovery in v1. Puppeteer page hooks do not provide a hydration callback. Read Migrating to v1 before upgrading custom discovery integrations.

Did this page help you?
Anything that could be done better? :)
Help us improve this page. You can edit this page on GitHub or provide anonymous feedback below.