forked from rrweb-io/rrweb
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action for size limit info, similar to the sentry-javascript repo. This should make it much easier to check the impact of changes. --------- Co-authored-by: mydea <mydea@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
735 additions
and
2,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Size Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release/** | ||
pull_request: | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
job_size_check: | ||
name: Size Check | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js lts/* | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
cache: 'yarn' | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build Project | ||
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all | ||
- name: Check bundle sizes | ||
uses: getsentry/size-limit-action@runForBranch | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
skip_step: build | ||
main_branch: sentry-v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = [ | ||
// Main browser webpack builds | ||
{ | ||
name: 'rrweb - record only (gzipped)', | ||
path: 'packages/rrweb/es/rrweb/packages/rrweb/src/entries/all.js', | ||
import: '{ record }', | ||
gzip: true | ||
}, | ||
{ | ||
name: 'rrweb - record only (min)', | ||
path: 'packages/rrweb/es/rrweb/packages/rrweb/src/entries/all.js', | ||
import: '{ record }', | ||
gzip: false | ||
}, | ||
{ | ||
name: 'rrweb - record with treeshaking flags (gzipped)', | ||
path: 'packages/rrweb/es/rrweb/packages/rrweb/src/entries/all.js', | ||
import: '{ record }', | ||
gzip: true, | ||
modifyWebpackConfig: function (config) { | ||
const webpack = require('webpack'); | ||
config.plugins.push( | ||
new webpack.DefinePlugin({ | ||
__RRWEB_EXCLUDE_CANVAS__: true, | ||
__RRWEB_EXCLUDE_SHADOW_DOM__: true, | ||
__RRWEB_EXCLUDE_IFRAME__: true, | ||
}), | ||
); | ||
return config; | ||
}, | ||
}, | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import type { Mirror } from '@sentry-internal/rrweb-snapshot'; | ||
import { | ||
blockClass, | ||
CanvasContext, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.