Skip to content

Commit 9193b71

Browse files
authored
chore(replay): Add size limit entries for Replay (#6288)
Add size limit entries for Replay. One entry for the (currently still exisiting) NPM bundle and two more for the package built with WebPack. When comparing the size-limit results here with the results from the replay repo, the size goes up from 35 to 83KB but I'm pretty sure our result is more representative (the file already has 135 KB when inspecting it locally). My suspicion is that the size-limit action from the replay repo measures size differently, as it uses other GH actions and newer size-limit versions.
1 parent 6de1dd8 commit 9193b71

File tree

3 files changed

+34
-21
lines changed

3 files changed

+34
-21
lines changed

.size-limit.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,25 @@ module.exports = [
6363
gzip: true,
6464
limit: '100 KB',
6565
},
66+
// This entry is only here temporarily and will be replaced once we have proper CDN bundles
67+
{
68+
name: '@sentry/replay index.js',
69+
path: 'packages/replay/build/npm/dist/index.js',
70+
gzip: true,
71+
limit: '100 KB',
72+
},
73+
{
74+
name: '@sentry/replay - Webpack (gzipped + minified)',
75+
path: 'packages/replay/build/npm/dist/index.js',
76+
import: '{ Replay }',
77+
gzip: true,
78+
limit: '100 KB',
79+
},
80+
{
81+
name: '@sentry/replay - Webpack (minified)',
82+
path: 'packages/replay/build/npm/dist/index.js',
83+
import: '{ Replay }',
84+
gzip: false,
85+
limit: '300 KB',
86+
},
6687
];
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
{
2-
"compilerOptions": {
3-
"module": "esnext",
4-
"moduleResolution": "node",
5-
"noImplicitAny": true,
6-
"noEmitOnError": false,
7-
"esModuleInterop": true,
8-
"resolveJsonModule": true,
9-
"skipLibCheck": true,
10-
"target": "es5"
11-
},
2+
"compilerOptions": {},
123
"exclude": ["node_modules"]
134
}

packages/replay/tsconfig.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
22
"extends": "./config/tsconfig.core.json",
33
"compilerOptions": {
4+
"module": "esnext",
5+
"moduleResolution": "node",
6+
"noImplicitAny": true,
7+
"noEmitOnError": false,
8+
"esModuleInterop": true,
9+
"resolveJsonModule": true,
10+
"skipLibCheck": true,
11+
"types": ["node", "jest"],
12+
"target": "es5",
413
"paths": {
514
"@test": ["./test"],
6-
"@test/*":
7-
["./test/*"]
8-
},
9-
"types": ["node", "jest"]
15+
"@test/*": ["./test/*"]
16+
}
1017
},
11-
"include": [
12-
"src/**/*.ts",
13-
"test/**/*.ts",
14-
"rollup.config.ts",
15-
"jest.config.ts",
16-
"jest.setup.ts"
17-
],
18+
"include": ["src/**/*.ts", "test/**/*.ts", "rollup.config.ts", "jest.config.ts", "jest.setup.ts"],
1819
"exclude": ["node_modules"]
1920
}

0 commit comments

Comments
 (0)