forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.size-limit.js
39 lines (35 loc) · 895 Bytes
/
.size-limit.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
const fs = require('fs');
const buildId = fs.readFileSync('.next/BUILD_ID', 'utf8');
const dirname = '.next/static/chunks';
const [main] = fs.readdirSync(dirname).reduce((result, filename) => {
if (filename.length === 31) {
return [...result, { path: `${dirname}/${filename}` }];
}
return result;
}, []);
module.exports = [
{
name: 'The initial cost paid for using one component',
webpack: true,
path: 'packages/material-ui/build/Paper/index.js',
limit: '18.5 KB',
},
{
name: 'The size of all the material-ui modules.',
webpack: true,
path: 'packages/material-ui/build/index.js',
limit: '94.1 KB',
},
{
name: 'The main docs bundle',
webpack: false,
path: main.path,
limit: '184 KB',
},
{
name: 'The docs home page',
webpack: false,
path: `.next/static/${buildId}/pages/index.js`,
limit: '6 KB',
},
];