Skip to content

Commit

Permalink
chore(replay): Add size limit entries for Replay (#6288)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Lms24 authored Nov 24, 2022
1 parent 6de1dd8 commit 9193b71
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 21 deletions.
21 changes: 21 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,25 @@ module.exports = [
gzip: true,
limit: '100 KB',
},
// This entry is only here temporarily and will be replaced once we have proper CDN bundles
{
name: '@sentry/replay index.js',
path: 'packages/replay/build/npm/dist/index.js',
gzip: true,
limit: '100 KB',
},
{
name: '@sentry/replay - Webpack (gzipped + minified)',
path: 'packages/replay/build/npm/dist/index.js',
import: '{ Replay }',
gzip: true,
limit: '100 KB',
},
{
name: '@sentry/replay - Webpack (minified)',
path: 'packages/replay/build/npm/dist/index.js',
import: '{ Replay }',
gzip: false,
limit: '300 KB',
},
];
11 changes: 1 addition & 10 deletions packages/replay/config/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": true,
"noEmitOnError": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "es5"
},
"compilerOptions": {},
"exclude": ["node_modules"]
}
23 changes: 12 additions & 11 deletions packages/replay/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"extends": "./config/tsconfig.core.json",
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": true,
"noEmitOnError": false,
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"types": ["node", "jest"],
"target": "es5",
"paths": {
"@test": ["./test"],
"@test/*":
["./test/*"]
},
"types": ["node", "jest"]
"@test/*": ["./test/*"]
}
},
"include": [
"src/**/*.ts",
"test/**/*.ts",
"rollup.config.ts",
"jest.config.ts",
"jest.setup.ts"
],
"include": ["src/**/*.ts", "test/**/*.ts", "rollup.config.ts", "jest.config.ts", "jest.setup.ts"],
"exclude": ["node_modules"]
}

0 comments on commit 9193b71

Please sign in to comment.