8000 chore(build): Lower size-limit limits (#6543) · danieliu/sentry-javascript@7139cec · GitHub
[go: up one dir, main page]

Skip to content

Commit 7139cec

Browse files
authored
chore(build): Lower size-limit limits (getsentry#6543)
Lower our `size-limit` maximum bundle size limits. Previously, most of them were set to rather arbitrary high numbers (100Kb mostly). With these adjustments, we lower them to +10Kb of each entry's current size. The reason for doing this is to catch problems with tree shaking or unexpected large bundle size hits more reliably. As outlined in getsentry#6508 (comment), we could for instance catch the Replay integration being wrongfully included in to our standalone Browser SDK CDN bundles. In case the limits are hit, the "Size Limit" CI job will fail.
1 parent a952d5f commit 7139cec

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.size-limit.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,79 @@ module.exports = [
33
name: '@sentry/browser - ES5 CDN Bundle (gzipped + minified)',
44
path: 'packages/browser/build/bundles/bundle.es5.min.js',
55
gzip: true,
6-
limit: '100 KB',
6+
limit: '30 KB',
77
},
88
{
99
name: '@sentry/browser - ES5 CDN Bundle (minified)',
1010
path: 'packages/browser/build/bundles/bundle.es5.min.js',
1111
gzip: false,
12-
limit: '120 KB',
12+
limit: '70 KB',
1313
},
1414
{
1515
name: '@sentry/browser - ES6 CDN Bundle (gzipped + minified)',
1616
path: 'packages/browser/build/bundles/bundle.min.js',
1717
gzip: true,
18-
limit: '100 KB',
18+
limit: '28 KB',
1919
},
2020
{
2121
name: '@sentry/browser - ES6 CDN Bundle (minified)',
2222
path: 'packages/browser/build/bundles/bundle.min.js',
2323
gzip: false,
24-
limit: '120 KB',
24+
limit: '65 KB',
2525
},
2626
{
2727
name: '@sentry/browser - Webpack (gzipped + minified)',
2828
path: 'packages/browser/build/npm/esm/index.js',
2929
import: '{ init 10000 }',
3030
gzip: true,
31-
limit: '100 KB',
31+
limit: '30 KB',
3232
},
3333
{
3434
name: '@sentry/browser - Webpack (minified)',
3535
path: 'packages/browser/build/npm/esm/index.js',
3636
import: '{ init }',
3737
gzip: false,
38-
limit: '100 KB',
38+
limit: '76 KB',
3939
},
4040
{
4141
name: '@sentry/react - Webpack (gzipped + minified)',
4242
path: 'packages/react/build/esm/index.js',
4343
import: '{ init }',
4444
gzip: true,
45-
limit: '100 KB',
45+
limit: '30 KB',
4646
},
4747
{
4848
name: '@sentry/nextjs Client - Webpack (gzipped + minified)',
4949
path: 'packages/nextjs/build/esm/index.client.js',
5050
import: '{ init }',
5151
gzip: true,
52-
limit: '100 KB',
52+
limit: '57 KB',
5353
},
5454
{
5555
name: '@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified)',
5656
path: 'packages/tracing/build/bundles/bundle.tracing.es5.min.js',
5757
gzip: true,
58-
limit: '100 KB',
58+
limit: '37 KB',
5959
},
6060
{
6161
name: '@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified)',
6262
path: 'packages/tracing/build/bundles/bundle.tracing.min.js',
6363
gzip: true,
64-
limit: '100 KB',
64+
limit: '35 KB',
6565
},
6666
{
6767
name: '@sentry/replay ES6 CDN Bundle (gzipped + minified)',
6868
path: 'packages/replay/build/bundles/replay.min.js',
6969
gzip: true,
70-
limit: '100 KB',
70+
limit: '52 KB',
7171
ignore: ['@sentry/browser', '@sentry/utils', '@sentry/core', '@sentry/types'],
7272
},
7373
{
7474
name: '@sentry/replay - Webpack (gzipped + minified)',
7575
path: 'packages/replay/build/npm/esm/index.js',
7676
import: '{ Replay }',
7777
gzip: true,
78-
limit: '100 KB',
78+
limit: '48 KB',
7979
ignore: ['@sentry/browser', '@sentry/utils', '@sentry/core', '@sentry/types'],
8080
},
8181
];

0 commit comments

Comments
 (0)
0