-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.lighthouserc.js
39 lines (39 loc) · 1.46 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',
'target-size': 'off', // designed for print
'total-byte-weight': 'off', // borderline exceeds 5k KiB; optimize later
'unused-javascript': 'off', // remove from main bundle if possible
'uses-text-compression': 'off' // if using actual server
}
},
collect: {
settings: {
preset: 'desktop',
chromeFlags: '--no-sandbox --headless'
},
startServerCommand: 'npm run start:prod',
startServerReadyPattern: 'Listening',
startServerReadyTimeout: 100000,
url: ['http://localhost:4000/']
},
upload: {
outputDir: './tmp/lighthouse',
reportFilenamePattern: 'lighthouse-%%DATETIME%%.%%EXTENSION%%',
target: 'filesystem'
}
}
};