-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.size-limit.cjs
More file actions
51 lines (50 loc) · 1.29 KB
/
Copy path.size-limit.cjs
File metadata and controls
51 lines (50 loc) · 1.29 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
// size-limit 配置:为 React / Vue 两个发布包的产物声明 gzip 上限
// 任何 PR 若使任一产物超阈值,CI 会失败。
module.exports = [
// ---------- React 包 ----------
{
name: 'react: index.mjs (main entry, gzip)',
path: 'packages/react-file-preview/lib/index.mjs',
limit: '3 MB',
gzip: true,
},
{
name: 'react: all js (entry + chunks, gzip)',
path: [
'packages/react-file-preview/lib/index.mjs',
'packages/react-file-preview/lib/chunks/*.mjs',
'packages/react-file-preview/lib/renderers/*.mjs',
],
limit: '3 MB',
gzip: true,
},
{
name: 'react: css (gzip)',
path: 'packages/react-file-preview/lib/**/*.css',
limit: '3 MB',
gzip: true,
},
// ---------- Vue 包 ----------
{
name: 'vue: index.mjs (main entry, gzip)',
path: 'packages/vue-file-preview/lib/index.mjs',
limit: '3 MB',
gzip: true,
},
{
name: 'vue: all js (entry + chunks, gzip)',
path: [
'packages/vue-file-preview/lib/index.mjs',
'packages/vue-file-preview/lib/chunks/*.mjs',
'packages/vue-file-preview/lib/renderers/*.mjs',
],
limit: '3 MB',
gzip: true,
},
{
name: 'vue: css (gzip)',
path: 'packages/vue-file-preview/lib/**/*.css',
limit: '3 MB',
gzip: true,
},
];