forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.size-limit.js
39 lines (35 loc) · 918 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 === 23) {
return [...result, { path: `${dirname}/${filename}` }];
}
return result;
}, []);
module.exports = [
{
name: 'The initial cost people pay for using one component',
webpack: true,
path: 'packages/material-ui/build/Paper/index.js',
limit: '17.6 KB',
},
{
name: 'The size of all the modules of material-ui.',
webpack: true,
path: 'packages/material-ui/build/index.js',
limit: '89.0 KB',
},
{
name: 'The main bundle of the docs',
webpack: false,
path: main.path,
limit: '178 KB',
},
{
name: 'The home page of the docs',
webpack: false,
path: `.next/static/${buildId}/pages/index.js`,
limit: '6 KB',
},
];