forked from tangly1024/NotionNext
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlighthouserc.js
More file actions
61 lines (56 loc) · 1.78 KB
/
lighthouserc.js
File metadata and controls
61 lines (56 loc) · 1.78 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
55
56
57
58
59
60
61
module.exports = {
ci: {
collect: {
url: ['http://localhost:3000'],
startServerCommand: 'npm start',
startServerReadyPattern: 'ready on',
startServerReadyTimeout: 60000,
numberOfRuns: 3,
settings: {
chromeFlags: '--no-sandbox --disable-dev-shm-usage'
}
},
assert: {
assertions: {
'categories:performance': ['warn', { minScore: 0.8 }],
'categories:accessibility': ['error', { minScore: 0.9 }],
'categories:best-practices': ['warn', { minScore: 0.8 }],
'categories:seo': ['error', { minScore: 0.9 }],
'categories:pwa': ['warn', { minScore: 0.6 }],
// Core Web Vitals
'first-contentful-paint': ['warn', { maxNumericValue: 2000 }],
'largest-contentful-paint': ['warn', { maxNumericValue: 2500 }],
'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],
'total-blocking-time': ['warn', { maxNumericValue: 300 }],
// Other important metrics
'speed-index': ['warn', { maxNumericValue: 3000 }],
'interactive': ['warn', { maxNumericValue: 3000 }],
// Accessibility
'color-contrast': 'error',
'image-alt': 'error',
'label': 'error',
'link-name': 'error',
// Best Practices
'uses-https': 'error',
'is-on-https': 'error',
'uses-http2': 'warn',
// SEO
'document-title': 'error',
'meta-description': 'error',
'robots-txt': 'warn',
'canonical': 'warn'
}
},
upload: {
target: 'temporary-public-storage'
},
server: {
port: 9001,
storage: {
storageMethod: 'sql',
sqlDialect: 'sqlite',
sqlDatabasePath: './lhci.db'
}
}
}
}