-
Notifications
You must be signed in to change notification settings - Fork 192
Expand file tree
/
Copy path.lighthouserc.js
More file actions
54 lines (48 loc) · 1.87 KB
/
.lighthouserc.js
File metadata and controls
54 lines (48 loc) · 1.87 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
ci: {
collect: {
url: ['http://localhost:3000/', 'http://localhost:3000/docs/intro'],
startServerCommand: 'npm run serve',
numberOfRuns: 3,
},
assert: {
assertions: {
'categories:performance': ['error', {minScore: 0.8}],
'categories:accessibility': ['error', {minScore: 0.9}],
'categories:best-practices': ['error', {minScore: 0.9}],
'categories:seo': ['error', {minScore: 0.9}],
'categories:pwa': ['error', {minScore: 0.8}],
// Core Web Vitals
'first-contentful-paint': ['error', {maxNumericValue: 2000}],
'largest-contentful-paint': ['error', {maxNumericValue: 2500}],
'first-input-delay': ['error', {maxNumericValue: 100}],
'cumulative-layout-shift': ['error', {maxNumericValue: 0.1}],
'speed-index': ['error', {maxNumericValue: 3000}],
'interactive': ['error', {maxNumericValue: 3000}],
// Resource optimization
'unused-css-rules': ['error', {maxNumericValue: 20000}],
'unused-javascript': ['error', {maxNumericValue: 20000}],
'unminified-css': 'error',
'unminified-javascript': 'error',
'render-blocking-resources': ['error', {maxNumericValue: 500}],
// Image optimization
'modern-image-formats': 'error',
'uses-optimized-images': 'error',
'uses-responsive-images': 'error',
'offscreen-images': 'error',
// Caching
'uses-long-cache-ttl': 'error',
'efficient-animated-content': 'error',
// JavaScript optimization
'legacy-javascript': 'error',
'uses-text-compression': 'error',
// Preloading
'uses-rel-preload': 'error',
'uses-rel-preconnect': 'error',
},
},
upload: {
target: 'temporary-public-storage',
},
},
};