forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.size-limit.js
52 lines (48 loc) · 1.26 KB
/
.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
40
41
42
43
44
45
46
47
48
49
50
51
52
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.6 KB',
},
{
name: 'The size of the @material-ui/core modules',
webpack: true,
path: 'packages/material-ui/build/index.js',
limit: '95.4 KB',
},
{
name: 'The size of the @material-ui/styles modules',
webpack: true,
path: 'packages/material-ui-styles/build/index.js',
limit: '15.0 KB',
},
{
// vs https://bundlephobia.com/result?p=react-popper
name: 'The size of the @material-ui/core/Popper component',
webpack: true,
path: 'packages/material-ui/build/Popper/index.js',
limit: '10.0 KB',
},
{
name: 'The main docs bundle',
webpack: false,
path: main.path,
limit: '177 KB',
},
{
name: 'The docs home page',
webpack: false,
path: `.next/static/${buildId}/pages/index.js`,
limit: '6 KB',
},
];