Guides
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?
On this page