Guides
Desktop Mode & Device Configuration
Test performance across different screen sizes and network conditions. Configure mobile, desktop, or custom viewport settings with optional network throttling for realistic performance testing.
Device Types
Desktop Scanning
import { defineUnlighthouseConfig } from 'unlighthouse/config'
export default defineUnlighthouseConfig({
scanner: {
device: 'desktop',
},
})
Mobile Scanning (Default)
export default defineUnlighthouseConfig({
scanner: {
device: 'mobile',
},
})
Custom Dimensions
Test specific viewport sizes for responsive breakpoints:
export default defineUnlighthouseConfig({
lighthouseOptions: {
screenEmulation: {
width: 1800,
height: 1000,
},
},
})
Network Throttling
Throttling simulates slower network and CPU conditions for more realistic performance testing:
export default defineUnlighthouseConfig({
scanner: {
throttle: true,
},
})
Throttling is automatically enabled for production sites and disabled for localhost by default.
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.
On this page