generated from r34son/next-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.lighthouserc.cjs
33 lines (31 loc) · 935 Bytes
/
.lighthouserc.cjs
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
// TODO: https://github.com/GoogleChrome/lighthouse-ci/issues/973
const puppeteer = require('puppeteer');
const isCI = require('is-ci');
module.exports = {
ci: {
collect: {
startServerCommand: isCI ? '' : 'pnpm lhci:start',
startServerReadyPattern: 'Ready',
startServerReadyTimeout: 60000,
url: ['http://localhost:3000/en'],
numberOfRuns: 3,
chromePath: !isCI && puppeteer.executablePath(),
},
assert: {
preset: 'lighthouse:no-pwa',
assertions: {
'bf-cache': 'off',
// TODO:
'unused-javascript': 'off',
'total-byte-weight': 'off',
// Because of YM script
deprecations: 'off',
'inspector-issues': 'off',
'no-unload-listeners': 'off',
'uses-long-cache-ttl': 'off',
'third-party-cookies': 'off',
'errors-in-console': isCI ? ['error', { minScore: 0.9 }] : 'off',
},
},
},
};