-
Notifications
You must be signed in to change notification settings - Fork 3
/
.lighthouserc.js
39 lines (39 loc) · 1.42 KB
/
.lighthouserc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module.exports = {
ci: {
assert: {
preset: 'lighthouse:no-pwa',
assertions: {
'categories:performance': ['error', { minScore: 0.95 }],
'categories:accessibility': ['error', { minScore: 1 }],
'categories:best-practices': ['error', { minScore: 1 }],
'categories:seo': ['error', { minScore: 1 }],
'cumulative-layout-shift': ['warn', { maxNumericValue: 0.1 }],
'first-contentful-paint': ['warn', { maxNumericValue: 750 }],
interactive: ['error', { maxNumericValue: 1000 }],
'largest-contentful-paint': ['warn', { maxNumericValue: 1200 }],
'speed-index': ['warn', { maxNumericValue: 1000 }],
// application not setup for production server
'csp-xss': 'off',
'unused-css-rules': 'off', // remove from styles bundle if possible
'unused-javascript': 'off', // remove from main bundle if possible
'uses-long-cache-ttl': 'off',
'uses-text-compression': 'off'
}
},
collect: {
settings: {
preset: 'desktop',
chromeFlags: '--no-sandbox --headless'
},
startServerCommand: 'npm run prod:ssr',
startServerReadyPattern: 'Listening',
startServerReadyTimeout: 300000,
url: ['http://localhost:3333/']
},
upload: {
outputDir: './tmp/lighthouse',
reportFilenamePattern: 'lighthouse-%%DATETIME%%.%%EXTENSION%%',
target: 'filesystem'
}
}
};