From d3e7c7777492c037765cca5c9a53d2070d739fb9 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Mon, 6 Feb 2023 15:11:16 +0100 Subject: [PATCH 1/2] build: Generate errors + replay only CDN bundle --- packages/browser/rollup.bundle.config.js | 12 ++++++++++++ packages/tracing/rollup.bundle.config.js | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/browser/rollup.bundle.config.js b/packages/browser/rollup.bundle.config.js index 23f9bb474c94..e063a9bd4ab0 100644 --- a/packages/browser/rollup.bundle.config.js +++ b/packages/browser/rollup.bundle.config.js @@ -14,4 +14,16 @@ const builds = []; builds.push(...makeBundleConfigVariants(baseBundleConfig)); }); +// Full bundle incl. replay only available for es6 +const replayBaseBundleConfig = makeBaseBundleConfig({ + bundleType: 'standalone', + entrypoints: ['src/index.ts'], + jsVersion: 'es6', + licenseTitle: '@sentry/browser & @sentry/replay', + outputFileBase: () => 'bundles/bundle.replay', + includeReplay: true, +}); + +builds.push(...makeBundleConfigVariants(replayBaseBundleConfig)); + export default builds; diff --git a/packages/tracing/rollup.bundle.config.js b/packages/tracing/rollup.bundle.config.js index b4ac04aa8e76..a0c5bc6cd421 100644 --- a/packages/tracing/rollup.bundle.config.js +++ b/packages/tracing/rollup.bundle.config.js @@ -14,7 +14,7 @@ const builds = []; builds.push(...makeBundleConfigVariants(baseBundleConfig)); }); -// Full bundle incl. replay only avaialable for es6 +// Full bundle incl. replay only available for es6 const replayBaseBundleConfig = makeBaseBundleConfig({ bundleType: 'standalone', entrypoints: ['src/index.bundle.replay.ts'], From 23c57523668d02bd4baf5f77aa63de580632487b Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Tue, 7 Feb 2023 11:41:22 +0100 Subject: [PATCH 2/2] add size bot --- .size-limit.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.size-limit.js b/.size-limit.js index 461de7995ad1..edc8a5466235 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -84,4 +84,10 @@ module.exports = [ gzip: true, limit: '80 KB', }, + { + name: '@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified)', + path: 'packages/browser/build/bundles/bundle.replay.min.js', + gzip: true, + limit: '80 KB', + }, ];