Skip to content

Commit 199403d

Browse files
committed
feat: Try size-limit gh action
1 parent 9041c1d commit 199403d

File tree

4 files changed

+2186
-55
lines changed

4 files changed

+2186
-55
lines changed

.github/workflows/size-limit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 'Bundle Size'
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
jobs:
7+
size:
8+
runs-on: ubuntu-latest
9+
env:
10+
CI_JOB_NUMBER: 1
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: andresz1/size-limit-action@v1
14+
with:
15+
github_token: ${{ secrets.GITHUB_TOKEN }}

.size-limit.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = [
2+
{
3+
name: '@sentry/browser - CDN Bundle (gzipped)',
4+
path: 'packages/browser/build/bundle.min.js',
5+
gzip: true,
6+
limit: '18 KB',
7+
},
8+
{
9+
name: '@sentry/browser - Webpack',
10+
path: 'packages/browser/dist/index.js',
11+
import: '{ init }',
12+
limit: '18 KB',
13+
},
14+
];

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"postpublish": "make publish-docs"
1616
},
1717
"volta": {
18-
"node": "10.15.3",
18+
"node": "10.18.1",
1919
"yarn": "1.13.0"
2020
},
2121
"workspaces": [
@@ -34,6 +34,7 @@
3434
],
3535
"devDependencies": {
3636
"@google-cloud/storage": "^2.5.0",
37+
"@size-limit/preset-big-lib": "^4.5.5",
3738
"@strictsoftware/typedoc-plugin-monorepo": "^0.2.1",
3839
"@types/chai": "^4.1.3",
3940
"@types/jest": "^24.0.11",
@@ -55,6 +56,7 @@
5556
"replace-in-file": "^4.0.0",
5657
"rimraf": "^2.6.3",
5758
"sinon": "^7.3.2",
59+
"size-limit": "^4.5.5",
5860
"ts-jest": "^24.0.2",
5961
"tslint": "^5.16.0",
6062
"typedoc": "^0.14.2",

0 commit comments

Comments
 (0)